|
|
|
สอบถามเรื่องการส่งเมลล์ ด้วย phpmailer ค่ะ มันขึ้น error |
|
|
|
|
|
|
|
<html>
<head>
<title>ThaiCreate.Com Tutorial</title>
</head>
<body>
<?php
require_once('class.phpmailer.php');
$mail = new PHPMailer();
$mail->IsHTML(true);
$mail->IsSMTP();
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->SMTPSecure = "ssl"; // sets the prefix to the servier
$mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server
$mail->Port = 587; // set the SMTP port for the GMAIL server
$mail->Username = "[email protected]"; // GMAIL username
$mail->Password = "xxxxxxxxxxxx"; // GMAIL password
$mail->From = "[email protected]"; // "[email protected]";
//$mail->AddReplyTo = "[email protected]"; // Reply
$mail->FromName = "kwang"; // set from Name
$mail->Subject = "Test sending mail.";
$mail->Body = "My Body & <b>My Description</b>";
$mail->AddAddress("[email protected]", "chiangmai"); // to Address
$mail->AddAttachment("thaicreate/myfile.zip");
$mail->AddAttachment("thaicreate/myfile2.zip");
//$mail->AddCC("[email protected]", "Mr.Member ShotDev"); //CC
//$mail->AddBCC("[email protected]", "Mr.Member ShotDev"); //CC
//$mail->set('X-Priority', '1'); //Priority 1 = High, 3 = Normal, 5 = low
if(!$mail->Send()) {
echo "Mailer Error: " . $mail->ErrorInfo;
} else {
echo "Message sent!";
}
?>
</body>
</html>
ขอถามอีกครั้งค่ะ
มันติดเออเรอตรงนี้อะค่ะ
Mailer Error: Language string failed to load: [email protected]
ตรงบรรทัดนี้ค่ะ $mail->From = "[email protected]"; // "[email protected]";
|
ประวัติการแก้ไข 2011-03-01 14:59:58 2011-03-01 15:12:15
|
|
|
|
Date :
2011-03-01 14:55:33 |
By :
kwangz_07 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 01
|