Senin, 09 Februari 2009

Sending Email with PHP -Tutorials

?
//July 31st 2007
//This email script will deliver to all email clients
//Hotmail will put hers in junk folder, until the reader marks it as safe, once marked safe,
//subsequent emails will arrive to inbox safely


//set variables
$sender_name="Ajai Oluwaseun";//set the name that appears to the reciever
$subject="Test Email";
$message = "Thanks for reading my tutorials";
$to="seunemma@hotmail.com";//send to multiple by separating with comma
$from="seun@sadeeb.com.ng";

//Uncomment the next line to send carbon copy
$cc="sledgehammer23401@yahoo.com";//send to multiple by separating with comma

//Uncomment the next line to send blind carbon copy
$bcc="seunemma@yahoo.com";//send to multiple by separating with comma

//lets change the envelop address to the one we are using
ini_set(sendmail_path, "/usr/sbin/sendmail -t -f $from");
//date as at the time we are sending it
$date= date("r");

//set all necessary headers
$headers = "From: $sender_name<$from>\n";
$headers .= "Reply-To: $sender_name<$from>\n";
$headers .= "X-Sender: $sender_name<$from>\n";
$headers .= "X-Mailer: PHP4\n"; //mailer
$headers .= "X-Priority: 3\n"; //1 UrgentMessage, 3 Normal
$headers .= "Content-Transfer-encoding: 8bit\n";
$headers .= "MIME-Version: 1.0\n";
$headers .= "X-MSMail-Priority: High\n";
$headers .= "Importance: 3\n";
$headers .= "Date: $date\n";
$headers .= "Delivered-to: $to\n";
$headers .= "Return-Path: $sender_name<$from>\n";
$headers .= "Content-Type: text/plain; charset=UTF-8\n";

//Uncomment the next line to send html format
//$headers .= "Content-Type: text/html; charset=iso-8859-1\n";

//Uncomment the next line if you are sending carbon copy
//$headers .= "cc: $cc\n";

//Uncomment the next line if you are sending blind carbon copy
//$headers .= "bcc: $bcc";

//its time to send our mail
mail($to,$subject,$message,$headers);

//seing is believing
echo "mail sent to $to

$cc

$bcc";


?

source:http://webdezzi.com/index.icez



-----------------------------------------------

Related:


sqlserver2005-security
view information vb2005
write file in vb2005
Barcode-string-encoderVbnet
Changing-backgroundcolor
Trik finding google
Directly-filling control
Date-time format vb2008
Finding google rank
Domain checker phps cript
Foreign key sql2005
Create-insert-tableadapter
Check datagrid
Hapus error handling vb2008
Function2 vb2008

Tidak ada komentar:

Posting Komentar