(Last Updated On: December 10, 2009)

Ever find yourself typing the headers into the php mail() function over and over again?

Try using a standard function and calling it when you need to send mail.

function sendEmail($subject,$content,$from,$to){
$header = "Content-Type: text/html; charset=iso-8859-1\nFrom:$from";
if( mail($to, $subject, $content, $header) );


1 Comment

Giri Sangha · May 26, 2011 at 19:21

Smoked for 29 years.

Leave a Reply

Your email address will not be published.

%d bloggers like this: