PHP将邮件发送到垃圾邮件

时间:2019-12-28 08:54:07

标签: php phpmailer

我正在尝试发送电子邮件。 PHP电子邮件已在Gmail中正确发送,但在我的正式帐户Outlook中,它已在“垃圾邮件”文件夹中发送。如何避免这种情况?请帮忙。

function send_mail( $email, $message, $subject ) {
    require_once( 'PHPMailer/PHPMailerAutoload.php' );
    $mail = new PHPMailer();
    $mail->IsHTML(true);
    $mail->IsSMTP();
    $mail->SMTPDebug = false;
    $mail->SMTPAuth = true;
    $mail->SMTPSecure = "ssl";
    $mail->Host = "mail.antivirusakash.com";
    $mail->Port = 465;
    $mail->AddAddress( $email );
    $mail->Username = "no-reply@antivirusakash.com";
    $mail->Password = "******";
    $mail->SetFrom( 'no-reply@antivirusakash.com', 'Fizday' );
    $mail->AddReplyTo( "no-reply@antivirusakash.com", "Fizday" );
    $mail->Subject = $subject;
    $mail->MsgHTML( $message );
    $mail->Send(); 
}

0 个答案:

没有答案
相关问题