note 53508 rejected from function.mail by betz
| From: | betz@php.net | Date: | Sat, 04 Jun 2005 08:26:06 +0000 |
| Subject: | note 53508 rejected from function.mail by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-89892@lists.php.net to get a copy of this message | ||
Note Submitter: derek at snape dot net
----
I was using this script flawlessly for quite a while.....
But now a client is on earthlink, and earthlink tech support said that I have to be using PHP4.....
any ideas what I can do to update this script to work with PHP4
( script below ) - Thanks in advance. Derek
<?
if(!empty($HTTP_POST_VARS['sender_mail']) ||
!empty($HTTP_POST_VARS['sender_message']) ||
!empty($HTTP_POST_VARS['sender_subject']) ||
!empty($HTTP_POST_VARS['sender_name']))
{
$to = $recipient_email;
$subject = stripslashes($HTTP_POST_VARS['sender_subject']);
$body = stripslashes($HTTP_POST_VARS['sender_message']);
$body .= "\n\n---------------------------\n";
$body .= "Mail sent by: " . $HTTP_POST_VARS['sender_name'] . " <"
. $HTTP_POST_VARS['sender_mail'] . ">\n";
$header = "From: " . $HTTP_POST_VARS['sender_name'] . " <" .
$HTTP_POST_VARS['sender_mail'] . ">\n";
$header .= "Reply-To: " . $HTTP_POST_VARS['sender_mail'] . ">\n";
$header .= "X-Mailer: PHP/" . phpversion() . "\n";
$header .= "X-Priority: 1";
if(@mail($to, $subject, $body, $header))
{
echo "output=sent";
} else {
echo "output=error1";
}
} else {
echo "output=error2";
}
?>