2 Issues for Mail() in Win/PHP4-
| From: | Marie Monday | Date: | Sat, 02 Nov 2002 15:52:27 +0000 |
| Subject: | 2 Issues for Mail() in Win/PHP4- | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-16692@lists.php.net to get a copy of this message | ||
I'm a PHP newbie and have just installed php4.2.3 on WinNT 4.0 w/ IIS4.0
Already have set the SMTP and sendmail_from in php.ini.
1). Mail function sends mail, except that none of the html form
variables are parsed into the email body $message.
The script works fine run from another hosted (apache) webserver. Is
a config or script issue?
2). Received email message does not include the sender's email address
from $txtemail form variable.
Instead, it places their email address from the form in the message body
first line.
It is using the php.ini sendmail_from address.
<?php
{
$recipient="marie.monday@somemail.net";
$subject="Need Help";
$message="$txtname submitted a helpdesk request by web form.
A computer tech needs to contact $txtname shortly at $txtphone or by
email at $txtemail regarding $txtproblem";
$sender=$txtemail;
mail(trim($recipient), trim($subject), $message, trim($sender));
}
?>
TIA,
~marie