Re: php mail() function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



But it seems like the 'From:' address being given to the PHP mail()
function is maybe being ignored, because the error log lists
'www-data@homemade' as being the sender, rather than listing the shaw
address.

The snippet from the PHP code:

$email = $_POST['email'];
...
mail($to, $subject, $msg, 'From:' . $email);

I have tried setting both $to and $email to be the same shaw address
since I assumed it should be recognized by the mail server, but it's
still getting bounced. So why is 'www-data@homemade' being listed as
the sender? Any ideas?


On Sat, Oct 24, 2009 at 9:17 PM, James Prentice <prentice.j.a@xxxxxxxxx> wrote:
> I also suspect that the problem is due to the sender address, but I
> have tried using the shaw email address for the From: address that's
> given to the mail() function and it still gets bounced. It seems like
> the ISP should consider that address valid.
>
>
>
> On Sat, Oct 24, 2009 at 2:20 PM, Per olof Ljungmark <peo@xxxxxxxxxxx> wrote:
>> James Prentice wrote:
>>>
>>> It sends the bounced message to /var/mail/www-data and I get this:
>>>
>>> --19BE8A70109.1256417846/homemade
>>> Content-Description: Delivery report
>>> Content-Type: message/delivery-status
>>>
>>> Reporting-MTA: dns; homemade
>>> X-Postfix-Queue-ID: 19BE8A70109
>>> X-Postfix-Sender: rfc822; www-data@homemade
>>> Arrival-Date: Sat, 24 Oct 2009 13:57:26 -0700 (PDT)
>>>
>>> Final-Recipient: rfc822; xxx@xxxxxxx
>>> Action: failed
>>> Status: 5.0.0
>>> Diagnostic-Code: X-Postfix; shawmail.vc.shawcable.net
>>>
>>> --19BE8A70109.1256417846/homemade
>>> Content-Description: Undelivered Message
>>> Content-Type: message/rfc822
>>>
>>> Received: by homemade (Postfix, from userid 33)
>>>        id 19BE8A70109; Sat, 24 Oct 2009 13:57:26 -0700 (PDT)
>>> To: xxx@xxxxxxx
>>
>> Although 5.0.0 actually means something else I'm pretty sure you are
>> rejected because of an invalid sender address or domain. Use a sender
>> address that is valid with your ISP's mail relay.
>>
>> Just my $0.02
>>
>> --
>> per
>>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux