|
|
|
php ส่ง email ไม่ได้ ผมใช้ hmailserver mail ครับ |
|
|
|
|
|
|
|
ส่งไม่ได้ยังไงครับ บอกได้ว่า error หรือว่ายังไง
|
|
|
|
|
Date :
2013-02-20 08:41:36 |
By :
ikikkok |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ส่งใส่ติด BlackList แน่เลยพวก IP แบบ Dynamic เนีย
|
|
|
|
|
Date :
2013-02-20 09:04:03 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Code (PHP)
<?php
if ( isset( $_POST['mailto'] ) ) {
$subject = 'test send mail() from php';
$from = 'From: [email protected]';
$message = 'this is mail message.';
$result = mail($_POST['mailto'], $subject, $message, $from);
if ( $result ) {
echo 'done';
} else {
echo 'fail';
}
}
?>
<form method="post">
to: <input type="text" name="mailto" value="" />
<input type="submit" value="send" />
</form>
มัน echo 'fail';
|
|
|
|
|
Date :
2013-02-20 10:37:56 |
By :
โต้ง |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
set outlook ทำงานได้ปกติ แต่ function mail php ใช้งานไม่ได้
|
|
|
|
|
Date :
2013-02-21 14:30:19 |
By :
โต้ง |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
จากตัวอย่างนี้
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-02-21 17:28:56 |
By :
mr.win |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Load balance : Server 04
|