PDA

View Full Version : Need help with sending email with php


RottyM
12-12-2007, 02:39 PM
Hi there.. I had a great PhP which I was using to send out text alerts to my clients.. now its not working, can anyone help me get this back up and running. thanks in advance.

<?
function param($Name)
{
global $HTTP_POST_VARS;

if(isset($HTTP_POST_VARS[$Name]))
return($HTTP_POST_VARS[$Name]);

return("");
}

$from = param("from");
$to = param("to") ."@". param("carrier");
$cc = param("cc");
$bcc = param("bcc");
$subject = param("subject");
$body = param("body");

if($from != "" && $to != "" && $subject != "")
{
$headers = "From: " . $from . "\n" .
"To: " . $to . "\n" .
"CC: " . $cc . "\n" .
"BCC: " . $bcc;

mail("", $subject, $body, $headers);
}
?>

felgall
12-12-2007, 10:50 PM
See http://www.bluehostforum.com/showthread.php?t=11073 which explains the current problem with sending mail and what BlueHost are doing to fix it.