php-windows Digest 11 Jul 2005 22:11:33 -0000 Issue 2725

Topics (messages 26200 through 26202):

Re: How to make mail() use correct headers?
        26200 by: Rodrigo
        26201 by: anton
        26202 by: Ross Honniball

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
Try using the extra PHP parameter:


mail($mailto, $mailsubject, $mailmessage, $mailheaders, "-f".$mailfrom);
or
mail($mailto, $mailsubject, $mailmessage, $mailheaders,
"[EMAIL PROTECTED]");

This user has to be added to the /etc/mail/trusted-users otherwise an
X-Warning header will be added to the mail.


Grtz

Rodrigo
 

-----Original Message-----
From: anton [mailto:[EMAIL PROTECTED] 
Sent: maandag 11 juli 2005 9:51
To: [email protected]
Subject: [PHP-WIN] How to make mail() use correct headers?

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 = "[EMAIL PROTECTED]";
$from = "[EMAIL PROTECTED]";
$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:<[EMAIL PROTECTED]> 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

--- End Message ---
--- Begin Message ---
Hello,

Thank you. i tried that too. Does not help. Same thing.

-- 
Best Regards,
Anton


""Rodrigo"" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Try using the extra PHP parameter:
>
>
> mail($mailto, $mailsubject, $mailmessage, $mailheaders, "-f".$mailfrom);
> or
> mail($mailto, $mailsubject, $mailmessage, $mailheaders,
> "[EMAIL PROTECTED]");
>
> This user has to be added to the /etc/mail/trusted-users otherwise an
> X-Warning header will be added to the mail.
>
>
> Grtz
>
> Rodrigo

--- End Message ---
--- Begin Message ---
I haven't looked to see exactly what headers it produces, but using:

$old = ini_set('sendmail_from', '[EMAIL PROTECTED]');

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 = "[EMAIL PROTECTED]";
$from = "[EMAIL PROTECTED]";
$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:<[EMAIL PROTECTED]> 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


--- End Message ---

Reply via email to