【发布时间】:2014-03-12 08:47:05
【问题描述】:
Mandrill SMTP - API 110:PHPMailer 连接超时错误
错误
SMTP -> 错误:无法连接到服务器:连接超时 (110) SMTP 错误:无法连接到 SMTP 主机。 SMTP -> 错误:无法连接到服务器:连接超时 (110) SMTP 错误:无法连接到 SMTP 主机。
示例代码
<?php
$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->SMTPDebug = 1; // enables SMTP debug information (for testing)
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->SMTPSecure = "ssl"; // sets the prefix to the servier
$mail->Host = "smtp.mandrillapp.com"; // sets GMAIL as the SMTP server
$mail->Port = 465; // set the SMTP port for the GMAIL server
$mail->Username = “yourusername”; // GMAIL username
$mail->Password = “passowrd”; // GMAIL password
?>
【问题讨论】:
标签: smtp