note 53508 added to function.mail
| From: | derek at snape dot net | Date: | Fri, 03 Jun 2005 21:34:34 +0000 |
| Subject: | note 53508 added to function.mail | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-89884@lists.php.net to get a copy of this message | ||
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";
}
?>
----
Manual Page -- http://www.php.net/manual/en/function.mail.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+53508
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+53508&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+53508&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+53508&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+53508&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+53508&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+53508&report=yes
Search -- http://master.php.net/manage/user-notes.php