Current File : /home/inlingua/public_html/icentex/admin/commonFunc.php |
<?php
// Store all common / global functions here
//Function to send email
// You can add following header in case you want to send HTML Email
// $headers = 'MIME-Version: 1.0' . "\r\n";
// $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// or
// $headers .= 'Cc: birthdayarchive@example.com' . "\r\n";
// $headers .= 'Bcc: birthdaycheck@example.com' . "\r\n";
function sendEmail($from='',$to='', $subject='', $message='', $headers='', $extra='')
{ $fd = popen("/usr/sbin/sendmail -t $extra", 'w');
fputs($fd, "From: $from\n");
fputs($fd, "To: $to\n");
fputs($fd, "Subject: $subject\n");
fputs($fd, "X-Mailer: PHP4\n");
if ($headers) {
fputs($fd, "$headers\n");
}
fputs($fd, "\n");
fputs($fd, $message);
pclose($fd);
return true;
}
?>