Send Mail code
จาก Wiki2
Send html mail by PHP
- โปรแกรมสำเร็จรูปสามารถเอามาแกะได้ http://phpmailer.worxware.com/
- HTML Email Guide http://www.anandgraves.com/html-email-guide
- PHP: Sending Email (Text/HTML/Attachments)
- Advanced email in PHP
<?php
function SendMail()
{
$mydatetime = date('l jS \of F Y h:i:s A');
mail('jk@noklek.com','Running Log of mycron.php @ Beingpro.com',
" Mail run at ".$mydatetime ." from Function");
}
?>
<?
php
$strTo = "member@thaicreate.com";
$strSubject = "Test Send Email";
$strHeader = "From: webmaster@thaicreate.com";
$strMessage = "My Body & My Description";
$flgSend = @mail($strTo,$strSubject,$strMessage,$strHeader); // @ = No Show Error //
if($flgSend)
{
echo "Email Sending.";
}
else
{
echo "Email Can Not Send.";
}
?>
