小编Blu*_*ose的帖子

使用 Hotmail smtp 在 PHP 中发送邮件

我正在尝试使用 Hotmail Smtp 在 PHP 中发送邮件。但我收到如下错误:

2014-03-13 06:59:01 CLIENT -> SERVER: EHLO site.com 
2014-03-13 06:59:01 CLIENT -> SERVER: AUTH LOGIN 
2014-03-13 06:59:01 SMTP ERROR: AUTH command failed: 504 5.3.3 AUTH mechanism LOGIN not available 
2014-03-13 06:59:01 CLIENT -> SERVER: QUIT SMTP connect() failed. Mailer Error: SMTP connect() failed.
Run Code Online (Sandbox Code Playgroud)

请有人建议我我做错了什么?

我的代码:

error_reporting(E_STRICT);
require_once('class.phpmailer.php');
include('class.smtp.php');
$mail             = new PHPMailer(); //Initialize a new PHPMailer object;
//$body            = preg_replace("[\]",'',$body); //Replace unwanted characters of the content
$mail->CharSet ="ISO-8859-1";//Set the character set you need to specify …
Run Code Online (Sandbox Code Playgroud)

php email smtp hotmail

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

标签 统计

email ×1

hotmail ×1

php ×1

smtp ×1