1
山魈SMTP - API 110:連接超時ERROR與PHPMailer的山魈SMTP - API 110:連接超時ERROR與PHPMailer的
ERROR
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
?>