Fatal error: Class 'SMTP' not found in C:\xampp\htdocs\mail\PHPMailer\class.phpmailer.php on line 1196
<html> <head> <title>ThaiCreate.Com PHP Sending Email</title> </head> <body> <?php require_once ('PHPMailer/class.phpmailer.php'); $mail = new PHPMailer(true); $mail->IsSMTP(); // telling the class to use SMTP try { $mail->Encoding = "quoted-printable"; $mail->CharSet = "utf-8"; // send mail by gmail $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 = 465; // set the SMTP port for the GMAIL server $mail->Username = "[email protected]"; // GMAIL username $mail->Password = "xxxxxxxxxxxxxxx"; // GMAIL password $mail->From = "[email protected]"; // "[email protected]"; //$mail->AddReplyTo = "[email protected]"; // Reply $mail->FromName = "Mr.Weerachai Nukitram"; // set from Name $mail->Subject = "Test sending mail."; $mail->Body = "My Body & <b>My Description</b>"; $mail->AddAddress("[email protected]", "Mr.Adisorn Boonsong"); // to Address $mail->set('X-Priority', '1'); //Priority 1 = High, 3 = Normal, 5 = low $mail->Send(); } catch (phpmailerException$e) { echo $e->errorMessage(); //Pretty error messages from PHPMailer } catch (Exception $e) { echo $e->getMessage(); //Boring error messages from anything else! } ?> </body> </html>
SMTP Error: Could not authenticate. .
เพื่อความปลอดภัยของเว็บบอร์ด ไม่อนุญาติให้แทรก แท็ก [img]....[/img] โดยการอัพโหลดไฟล์รูปจากที่อื่น เช่นเว็บไซต์ ฟรีอัพโหลดต่าง ๆ อัพโหลดแทรกรูปภาพ ให้ใช้บริการอัพโหลดไฟล์ของไทยครีเอท และตัดรูปภาพให้พอดีกับสกรีน เพื่อความโหลดเร็วและไฟล์ไม่ถูกลบทิ้ง