I haven't looked to see exactly what headers it produces, but using:
$old = ini_set('sendmail_from', 'whoever@whatever');
before you use the mail() function works for me.
anton wrote:
Hello,
Our windows server has sendmail_from set to null in ini. We are hosting many
domains, and having a single address there makes no sense.
With null all mails that go out through our mailserver do not get a from
address. The from address is only ommunicated with additional mail headers
when using
$sendto = "to@xxxxxxxx";
$from = "from@xxxxxxxx";
$headers = "From: $from\r\n";
mail($sendto, $subject, $message, $headers);
The result is:
127.0.0.1 220 radio-nation.com ESMTP MailEnable Service, Version: 1.8--
ready at 07/11/05 127.0.0.1 HELO HELO EV1SERVE-V7V9CP 250 Requested mail
action okay, 127.0.0.1 MAIL MAIL FROM:<> 250 Requested mail action okay,
completed 43 14
127.0.0.1 RCPT RCPT TO:<to@xxxxxxxx> 250 Requested mail action okay,
completed 43 27
127.0.0.1 DATA DATA 354 Start mail input; end with <CRLF>.<CRLF> 46 6
127.0.0.1 QUIT QUIT 221 Service closing transmission channel 42 6
As you can see no from address is given. The mail server then replaces this
with a default mail address, and if a mail should buonce, it would get to
the server admin, not the responsible domain owner.
This is a problem!!!
How do you configure the mail() or the server to use the correct from
address when sending mail ?? why is mail() not using the MAIL FROM:
correctly ?
(Please reply only to newsgroup)
Thank you
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php