Send Mail code

จาก Wiki2

ข้ามไปที่: นำทาง, สืบค้น

Send html mail by 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.";

	}

?>
รับข้อมูลจาก "http://www.noklek.com/wiki2/index.php/Send_Mail_code"
เครื่องมือส่วนตัว