$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=UTF-8" . "\r\n";
// More headers
$headers .= 'From: <[email protected]>' . "\r\n";
$headers .= 'Cc: [email protected]' . "\r\n";
$email = new PHPMailer();
$email->isHTML(true);
$email->From = '<[email protected]>';
$email->FromName = 'Name';
$email->Subject = $Subject; //subject name
$email->Body = $txt; //This is html message
$email->AddAddress($to);
$email->AddAttachment("http://www.domain.in/" , "invoice.pdf", 'base64', 'application/octet-stream');
$email->Send();
文件没有发送,如果我在上面的部分中传递变量作为参数,它在静态值时不工作。如何通过php中的phpmailer函数传递动态值
正在我想这其中也。见下面的代码也被显示错误“无法访问文件:” @Pedro洛比托 –