$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洛比託 –