小编use*_*654的帖子

使用phpmailer发送批量邮件

我是Phpmailer的新手,我正在使用它从一个noreply帐户向超过一千人发送批量电子邮件.当我向一两个人发送电子邮件时,代码工作正常,但当我发送给每个人(包括我自己)时,它会转到垃圾邮件.另一个问题是电子邮件的详细信息,它显示了发送给它的所有人的电子邮件ID,我不希望它这样做.代码如下:

//date_default_timezone_set('America/Toronto');

require_once('../class.phpmailer.php');
//include("class.smtp.php"); // optional, gets called from within class.phpmailer.php  if not already loaded

$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host          = "smtp1.site.com;smtp2.site.com";
$mail->SMTPAuth      = true;// enable SMTP authentication
$mail->SMTPKeepAlive = true;// SMTP connection will not close after each email sent
$mail->Host          = "mail.yourdomain.com"; // sets the SMTP server
$mail->Port          = 26;                    // set the SMTP port for the server
$mail->Username      = "yourname@yourdomain"; // SMTP account username
$mail->Password      = "yourpassword";        // SMTP account …
Run Code Online (Sandbox Code Playgroud)

php email phpmailer

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

标签 统计

email ×1

php ×1

phpmailer ×1