|
|
|
ขอสอบถามเกี่ยวกับ PHPmailer คะ SMTP Error: Could not authenticate. Mailer Error: SMTP Error: Could not authenticate. |
|
|
|
|
|
|
|
Code (PHP)
<?php
require_once "Mail.php";
$from = "[email protected]";
$to = "[email protected]";
$subject = "Hi!";
$body = "Hi,\n\nHow are you?";
$host = "www.xxx.com";
$port = "25";
$username = "xxx";
$password = "xxx";
$headers = array ('From' => $from,
'To' => $to,
'Subject' => $subject);
$smtp = Mail::factory('smtp',
array ('host' => $host,
'port' => $port,
'auth' => true,
'username' => $username,
'password' => $password));
$mail = $smtp->send($to, $headers, $body);
if (PEAR::isError($mail)) {
echo("<p>" . $mail->getMessage() . "</p>");
} else {
echo("<p>Message successfully sent!</p>");
}
?>
บางทีมันอยู่ที่ Host ด้วยน่ะครับ ว่ามันส่งเมล์ได้หรือเปล่าอ่ะ Y Y
|
|
|
|
|
Date :
2014-05-21 12:16:54 |
By :
nut_ch31 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 03
|