3

カスタム Live ドメインを使用して phpmailer でメールを送信しようとしています。

$mail->host$mail->Port私が使用しているが正しいかどうかを知りたいです。

エラーは次のとおりです。

メーラー エラー: 次の From アドレスに失敗しました: yyy@xxxx.com : 接続せずに Mail() を呼び出しました

これが私のコードです:

require("../PHPMailer_5.2.4/class.phpmailer.php");

$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host       = "mail.live.com"; // SMTP server
$mail->SMTPDebug  = 0;                     // enables SMTP debug information (for testing)
// 1 = errors and messages
// 2 = messages only
$mail->SMTPAuth   = true;                  // enable SMTP authentication
$mail->SMTPSecure = "ssl";                 // sets the prefix to the servier
$mail->Host       = "smtp.live.com";      // sets GMAIL as the SMTP server
$mail->Port       = 465;
4

1 に答える 1

1

PHP Mailer は時代遅れであり、開発/サポートされていないことを覚えているので、Swift Mailerを見てください。

于 2013-03-28T00:15:48.523 に答える