Email tips for PHP Pear
Tuesday, May 19, 2009
0
comments
Email facility is required for almost every application. Hence these tips are helpful.
1. For datetime in proper format,
2. For both HTML and text mail,
3. For sending mail with SMTP Authentication,
A quick helpful tutorial: http://email.about.com/od/emailprogrammingtips/qt/et073006.htm
1. For datetime in proper format,
$headers["Date"] = date("r");2. For both HTML and text mail,
$headers["Content-Type"] = "multipart/alternative";
3. For sending mail with SMTP Authentication,
$mail = Mail::factory(
"smtp",
array ('host' => $host,
'auth' => 'true',
'username' => $username,
'password' => $password)
);
A quick helpful tutorial: http://email.about.com/od/emailprogrammingtips/qt/et073006.htm