|
|
|
ถ้าอยากจะระบุ port mail ในการส่ง ต้องใส่อย่างไรครับ |
|
|
|
|
|
|
|
จะต้องใช้ผ่านพวก SMTP ครับ
จากตัวอย่างนี้
PHP Sending Email Using Gmail SMTP Account Authentication
ผมเคยเขียนไว้ครับ
Code (PHP)
<?php
require_once('class.phpmailer.php');
$mail = new PHPMailer();
$mail->IsHTML(true);
$mail->IsSMTP();
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->SMTPSecure = ""; // sets the prefix to the servier
$mail->Host = "mail.thaicreate.com"; // sets GMAIL as the SMTP server
$mail->Port = 25; // set the SMTP port for the GMAIL server
$mail->Username = "[email protected]"; // GMAIL username
$mail->Password = "xxxxxxx"; // 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->Send();
?>
|
|
|
|
|
Date :
2013-03-06 09:32:43 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Good!
|
|
|
|
|
Date :
2013-03-06 14:11:53 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 04
|