小编Sum*_*wal的帖子

AddEmbeddedImage()函数包含内嵌图像以及附加相同的图像作为附件

我已将以下参数添加到PHPMailer对象.虽然我使用AddEmbeddedImage()函数嵌入了用于内联目的的图像,但它按预期工作,但另外附加相同的图像作为附件到电子邮件并在底部显示.

$msg = `<table><tr><td colspan="2"><img  src="cid:header_jpg" alt="www.example.in" width="770" height="4" border="0" /></td></tr></table>`;

$mail = new PHPMailer(true); //New instance, with exceptions enabled
$mail->IsSMTP(); // tell the class to use SMTP
$mail->SMTPAuth   = false;        // enable SMTP authentication
$mail->Port       = 25;           // set the SMTP server port
$mail->Host       = 'localhost';  // SMTP server
$mail->Username   = "";           // SMTP server username
$mail->Password   = "";           // SMTP server password

$mail->AddReplyTo($sender, $sender_name);

$mail->From       = $sender;
$mail->FromName   = $sender_name;

$mail->AddAddress($receiver);

$mail->Subject  = $subject;

//$mail->AltBody    = "To view …
Run Code Online (Sandbox Code Playgroud)

html php email

3
推荐指数
1
解决办法
2万
查看次数

标签 统计

email ×1

html ×1

php ×1