require("class.phpmailer.php");
$mail = new PHPMailer()
$mail->From = "[email protected]";
$mail->AddAddress("[email protected]"); // name is optional
$mail->AddReplyTo("[email protected]");
$mail->WordWrap = 50; // set word wrap to 50 characters
$mail->IsHTML(true); // set email format to HTML
$mail->Subject = "Here is the subject";
$mail->Body = "This is the HTML message body <b>in bold!</b>";
$mail->AltBody = "This is the body in plain text for non-HTML mail clients";
if(!$mail->Send())
{
echo "Message could not be sent. <p>";
echo "Mailer Error: " . $mail->ErrorInfo;
exit;
}
echo "Message has been sent";
我不知道需要添加哪些标题,才能将电子邮件作为垃圾邮件发送,而我该如何使用它?php mail() - 作为垃圾邮件发送(使用php邮件库)
//$mail->IsSMTP(); // is this necessary?
//$mail->Host = "some host ip"; // what i need to write here?
//$mail->SMTPAuth = true; // is this necessary to send email NOT as spam?
//$mail->Username = "test"; // and this?
//$mail->Password = "secret"; // and this?
有一段时间googling,我没有找到任何明确的信息关于如何发送电子邮件不作为垃圾邮件......任何想法?
现在我试图发送电子邮件至[email protected] - 但它是像发送垃圾邮件,我该怎么办?有没有关于如何避免这些问题的CLEAR信息? –
不幸的是,您目前使用的邮件服务器可能在过去发送垃圾邮件。您是否在共享托管计划? –