RE: [PHP] Unable to send mail from PHP to AT&T e-mail address

2009-04-24 Thread Bob McConnell
From: Chris

>>> the ini_set (or you can set the 5th param to the mail() function) is
a
>> 
>>> return-path. If the message bounces (recipient's mailbox full,
server 
>>> down, whatever the reason) it gets delivered to that address. They
>> serve 
>>> different purposes.
>> 
>> The dirty little secret that nobody seems to know is that the RFCs
>> reserve Return-path for use by the MTA servers. It can be replaced by
>> any of them in the routing chain and is used when mail crosses into
or
>> out of SMTP networks. If you want a return address other than From to
>> stick all the way through, you have to use the Reply-to and/or Sender
>> headers.
> 
> Emails don't bounce to those addresses though do they? I've always 
> thought the return-path is where an email is bounced to and reply-to
etc 
> are used by mail clients, not the mta's.

The way I read it, the return-path field is used to indicate a gateway
where the message entered the current email network. So a bounced
message has to be returned to that gateway to get back to the network
from whence it came. This is useful where traffic passes into an SMTP
network from a network with an older routing mechanism, or vice versa.
The intent is to return the bounce to the Sender or From address, in
that order.

But, since the RFC specifically says the field is reserved for use by
the MTAs, it is not proper behavior for an email client to add it to the
header.

Reply-to is a specific instruction to the recipients client software to
insert this address as To when a reply is composed. It is ignored by the
MTA.

If you don't want bounces to go to the From address, use Sender. It was
intended for mailing lists and administrative assistants to send mail on
behalf of someone else without having to forge their From address. It's
also useful when you have a web site running on a commercial server farm
outside your domain that has to send mail that acts like it came from
inside that domain. Many border filters will block mail when the From
line says it came from within their domain. So the From address can be
the web server (it doesn't even have to be a valid address) while Sender
indicates the address in the domain where any bounces need to be sent.

Bob McConnell

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



Re: [PHP] Unable to send mail from PHP to AT&T e-mail address

2009-04-23 Thread Chris



the ini_set (or you can set the 5th param to the mail() function) is a


return-path. If the message bounces (recipient's mailbox full, server 
down, whatever the reason) it gets delivered to that address. They
serve 

different purposes.


The dirty little secret that nobody seems to know is that the RFCs
reserve Return-path for use by the MTA servers. It can be replaced by
any of them in the routing chain and is used when mail crosses into or
out of SMTP networks. If you want a return address other than From to
stick all the way through, you have to use the Reply-to and/or Sender
headers.


Emails don't bounce to those addresses though do they? I've always 
thought the return-path is where an email is bounced to and reply-to etc 
are used by mail clients, not the mta's.


--
Postgresql & php tutorials
http://www.designmagick.com/


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



RE: [PHP] Unable to send mail from PHP to AT&T e-mail address

2009-04-23 Thread Bob McConnell
From: Chris
 Any light anyone can throw on the 'nob...@myserver.com' address
would be
 most welcome.
>>>
>>> It is using the apache user @ your host name as the default.  Try
this:
>>>
>>> ini_set('sendmail_from', 'whate...@wherever.com');
>> 
>> I will try this but I do not understand why it should work. I have a 
>> 'From:...' entry in my headers. Why is this not being used as the 
>> primary from address and why is 'nob...@myserver.com' being added 
>> instead as the first from address ? In other words, I can understand
if 
>> I supply no 'From:...' header entry that a default
'nob...@myserver.com' 
>> would be used but I do not understand why it is used even when I
supply 
>> a 'From:...' header entry.
>> 
> 
> "From: " is used by your mail client to show who it's from.
> 
> the ini_set (or you can set the 5th param to the mail() function) is a

> return-path. If the message bounces (recipient's mailbox full, server 
> down, whatever the reason) it gets delivered to that address. They
serve 
> different purposes.

The dirty little secret that nobody seems to know is that the RFCs
reserve Return-path for use by the MTA servers. It can be replaced by
any of them in the routing chain and is used when mail crosses into or
out of SMTP networks. If you want a return address other than From to
stick all the way through, you have to use the Reply-to and/or Sender
headers.

Bob McConnell

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



Re: [PHP] Unable to send mail from PHP to AT&T e-mail address

2009-04-22 Thread Edward Diener

Chris wrote:

Edward Diener wrote:

Chris wrote:


Any light anyone can throw on the 'nob...@myserver.com' address 
would be

most welcome.


It is using the apache user @ your host name as the default.  Try 
this:


ini_set('sendmail_from', 'whate...@wherever.com');


I will try this but I do not understand why it should work. I have a 
'From:...' entry in my headers. Why is this not being used as the 
primary from address and why is 'nob...@myserver.com' being added 
instead as the first from address ? In other words, I can understand 
if I supply no 'From:...' header entry that a default 
'nob...@myserver.com' would be used but I do not understand why it 
is used even when I supply a 'From:...' header entry.




"From: " is used by your mail client to show who it's from.

the ini_set (or you can set the 5th param to the mail() function) is 
a return-path. If the message bounces (recipient's mailbox full, 
server down, whatever the reason) it gets delivered to that address. 
They serve different purposes.


Does ini_set actually change the php.ini file in any way ?


No, it only affects the script it's running in. Comment it out.

Check your mail server logs and/or apache/php logs to see if anything is 
going there.


You are correct. The mail server logs showed that a number of outgoing 
e-mails had been blocked because of an error. Once the outgoing e-mails 
were released I received my e-mail.


It also turns out that the nob...@myserver.com was added to the header 
as the Reply-To address, not as a primary From address. I should have 
looked at this myself rather than taken the comment of someone else.


I am still trying to investigate why AT&T e-mails are not being received 
but it may have to do with the outgoing mail server and is being 
investigated by my employer. I will wait on any further script changes 
until he tells me what is happening with the outgoing mail server.


Thanks very much for your help.

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



Re: [PHP] Unable to send mail from PHP to AT&T e-mail address

2009-04-22 Thread Chris

9el wrote:

Does ini_set actually change the php.ini file in any way ? The reason I ask
is that after putting in:


Yes it does. :)you should have refered to the manual before using the line.


It does not.

It changes a setting for the script only. It does not change the 
physical php.ini file.


--
Postgresql & php tutorials
http://www.designmagick.com/


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



Re: [PHP] Unable to send mail from PHP to AT&T e-mail address

2009-04-22 Thread 9el
> Does ini_set actually change the php.ini file in any way ? The reason I ask
> is that after putting in:

Yes it does. :)you should have refered to the manual before using the line.

Did you write your  own myem...@myserver.com? or you kept that exactly
like in code?

>
> ini_set('sendmail_from', 'myem...@myserver.com');
>
> into a new script which I tested out against, the 'mail' function now
> continues to work but no e-mail is received no matter what the recipient
> e-mail is. Even is I go back to using my old script which does not have the
> 'ini_set' in it, no e-mail actually gets receoved even though 'mail'
> succeeds when called. So I have gone from bad to worse and the ini_set seems
> to have affected all calls to 'mail' in this way for PHP scripts on the
> server.
>
> Can I correct but somehow stopping PHP ( or may Apache ) and restarting it
> again to bring back the original php.ini setting ?

For now you can go back to set the php.ini to default with the
ini_set function.

You can use ini_get to retrieve data from the php.ini configs

a phpinfo() will show you all the current settings.

Regards

Lenin

www.twitter.com/nine_L

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



Re: [PHP] Unable to send mail from PHP to AT&T e-mail address

2009-04-22 Thread Chris

Edward Diener wrote:

Chris wrote:


Any light anyone can throw on the 'nob...@myserver.com' address 
would be

most welcome.


It is using the apache user @ your host name as the default.  Try this:

ini_set('sendmail_from', 'whate...@wherever.com');


I will try this but I do not understand why it should work. I have a 
'From:...' entry in my headers. Why is this not being used as the 
primary from address and why is 'nob...@myserver.com' being added 
instead as the first from address ? In other words, I can understand 
if I supply no 'From:...' header entry that a default 
'nob...@myserver.com' would be used but I do not understand why it is 
used even when I supply a 'From:...' header entry.




"From: " is used by your mail client to show who it's from.

the ini_set (or you can set the 5th param to the mail() function) is a 
return-path. If the message bounces (recipient's mailbox full, server 
down, whatever the reason) it gets delivered to that address. They 
serve different purposes.


Does ini_set actually change the php.ini file in any way ?


No, it only affects the script it's running in. Comment it out.

Check your mail server logs and/or apache/php logs to see if anything is 
going there.


--
Postgresql & php tutorials
http://www.designmagick.com/


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



Re: [PHP] Unable to send mail from PHP to AT&T e-mail address

2009-04-22 Thread Edward Diener

Chris wrote:


Any light anyone can throw on the 'nob...@myserver.com' address 
would be

most welcome.


It is using the apache user @ your host name as the default.  Try this:

ini_set('sendmail_from', 'whate...@wherever.com');


I will try this but I do not understand why it should work. I have a 
'From:...' entry in my headers. Why is this not being used as the 
primary from address and why is 'nob...@myserver.com' being added 
instead as the first from address ? In other words, I can understand 
if I supply no 'From:...' header entry that a default 
'nob...@myserver.com' would be used but I do not understand why it is 
used even when I supply a 'From:...' header entry.




"From: " is used by your mail client to show who it's from.

the ini_set (or you can set the 5th param to the mail() function) is a 
return-path. If the message bounces (recipient's mailbox full, server 
down, whatever the reason) it gets delivered to that address. They serve 
different purposes.


Does ini_set actually change the php.ini file in any way ? The reason I 
ask is that after putting in:


ini_set('sendmail_from', 'myem...@myserver.com');

into a new script which I tested out against, the 'mail' function now 
continues to work but no e-mail is received no matter what the recipient 
e-mail is. Even is I go back to using my old script which does not have 
the 'ini_set' in it, no e-mail actually gets receoved even though 'mail' 
succeeds when called. So I have gone from bad to worse and the ini_set 
seems to have affected all calls to 'mail' in this way for PHP scripts 
on the server.


Can I correct but somehow stopping PHP ( or may Apache ) and restarting 
it again to bring back the original php.ini setting ?


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



Re: [PHP] Unable to send mail from PHP to AT&T e-mail address

2009-04-22 Thread Chris



Any light anyone can throw on the 'nob...@myserver.com' address would be
most welcome.


It is using the apache user @ your host name as the default.  Try this:

ini_set('sendmail_from', 'whate...@wherever.com');


I will try this but I do not understand why it should work. I have a 
'From:...' entry in my headers. Why is this not being used as the 
primary from address and why is 'nob...@myserver.com' being added 
instead as the first from address ? In other words, I can understand if 
I supply no 'From:...' header entry that a default 'nob...@myserver.com' 
would be used but I do not understand why it is used even when I supply 
a 'From:...' header entry.




"From: " is used by your mail client to show who it's from.

the ini_set (or you can set the 5th param to the mail() function) is a 
return-path. If the message bounces (recipient's mailbox full, server 
down, whatever the reason) it gets delivered to that address. They serve 
different purposes.


--
Postgresql & php tutorials
http://www.designmagick.com/


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



Re: [PHP] Unable to send mail from PHP to AT&T e-mail address

2009-04-22 Thread Edward Diener

Shawn McKenzie wrote:

Edward Diener wrote:

Phpster wrote:


On Apr 21, 2009, at 20:32, Edward Diener  wrote:


I have a PHP script which uses the PHP 'mail' function. When the
script's 'to' address is an AT&T address, such as my own as an AT&T
ISP customer, the mail never gets to me. If the 'to' address is
anything other than an AT&T address, the mail gets to the recipient.
The PHP code for sending the mail is essentially:

   $headers  = 'MIME-Version: 1.0' . "\r\n";
   $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
   $headers .= 'From: Some From Name ';
   $to = 'mybellsouthaddress.net';
   $subject = 'Some Subject';
   $msg = 'Some Message';
   if(mail($to,$subject,$msg."\r\n\r\n",$headers))
   echo "good";
   else
   echo "bad";

In the actual PHP script the $to, $subject, and $msg are successfully
passed to the script from the client side as $_POST, $_POST and
$_FILES parameters respectively. I have just filled them in above so
that they can be seen as if they were part of the script. The script
always returns "good", so the mail function must be successful.

In my project, testing has reported that any attempt to use the
'mail' function on the server to send to an AT&T address fails to
reach the recipient, while all other addresses used in the testing
succeed in reaching the recipient. I can assert this to be the case
with my own AT&T address also. I have also checked my AT&T mailbox
online to make sure the mail is not being received as Spam.

Does anybody have an idea why using the 'mail' function succeeds with
all but AT&T $to addresses ? Naturally in the client-server
application on which I am working, sending mail from the server must
work for all $to addresses.

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


It might be that the server IP has been blacklisted with at&t as a
domain  from which spam is sent.

I have found out that the server adds a from header of
'nob...@myserver.com' where 'myserver' is the name of the server. This
header gets placed first before the From header I supply in my PHP
script ( which should have had the form in the example above of
'somefromn...@myserver.com, my bad ).

Perhaps the AT&T mail server, when it sees the 'nob...@myserver.com'
treats it as spam and does not deliver the mail to even the recipient's
spam mailbox.

I am not sure if it is normal for outgoing SMTP mail servers to
automatically add the 'nob...@myserver.com' from address first in the
header, or even why it does so ? Does anybody know if this is normal for
mail servers to do this ? Evidently other incoming mail servers do not
react to the 'nob...@myserver.com' in any way, so maybe AT&T is unique
in this.

Any light anyone can throw on the 'nob...@myserver.com' address would be
most welcome.


It is using the apache user @ your host name as the default.  Try this:

ini_set('sendmail_from', 'whate...@wherever.com');


I will try this but I do not understand why it should work. I have a 
'From:...' entry in my headers. Why is this not being used as the 
primary from address and why is 'nob...@myserver.com' being added 
instead as the first from address ? In other words, I can understand if 
I supply no 'From:...' header entry that a default 'nob...@myserver.com' 
would be used but I do not understand why it is used even when I supply 
a 'From:...' header entry.


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



RE: [PHP] Unable to send mail from PHP to AT&T e-mail address

2009-04-22 Thread kyle.smith

> Phpster wrote:
>>
>>
>> On Apr 21, 2009, at 20:32, Edward Diener 
wrote:
>>
>>> I have a PHP script which uses the PHP 'mail' function. When the 
>>> script's 'to' address is an AT&T address, such as my own as an AT&T 
>>> ISP customer, the mail never gets to me. If the 'to' address is 
>>> anything other than an AT&T address, the mail gets to the recipient.
>>> The PHP code for sending the mail is essentially:
>>>
>>>$headers  = 'MIME-Version: 1.0' . "\r\n";
>>>$headers .= 'Content-type: text/html; charset=iso-8859-1' .
"\r\n";
>>>$headers .= 'From: Some From Name ';
>>>$to = 'mybellsouthaddress.net';
>>>$subject = 'Some Subject';
>>>$msg = 'Some Message';
>>>if(mail($to,$subject,$msg."\r\n\r\n",$headers))
>>>echo "good";
>>>else
>>>echo "bad";
>>>
>>> In the actual PHP script the $to, $subject, and $msg are 
>>> successfully passed to the script from the client side as $_POST, 
>>> $_POST and $_FILES parameters respectively. I have just filled them 
>>> in above so that they can be seen as if they were part of the 
>>> script. The script always returns "good", so the mail function must
be successful.
>>>
>>> In my project, testing has reported that any attempt to use the 
>>> 'mail' function on the server to send to an AT&T address fails to 
>>> reach the recipient, while all other addresses used in the testing 
>>> succeed in reaching the recipient. I can assert this to be the case 
>>> with my own AT&T address also. I have also checked my AT&T mailbox 
>>> online to make sure the mail is not being received as Spam.
>>>
>>> Does anybody have an idea why using the 'mail' function succeeds 
>>> with all but AT&T $to addresses ? Naturally in the client-server 
>>> application on which I am working, sending mail from the server must

>>> work for all $to addresses.
>>>
>>> --
>>> PHP General Mailing List (http://www.php.net/) To unsubscribe,
>>> visit: http://www.php.net/unsub.php
>>>
>>
>> It might be that the server IP has been blacklisted with at&t as a 
>> domain  from which spam is sent.
> 
> I have found out that the server adds a from header of 
> 'nob...@myserver.com' where 'myserver' is the name of the server. This

> header gets placed first before the From header I supply in my PHP 
> script ( which should have had the form in the example above of 
> 'somefromn...@myserver.com, my bad ).
> 
> Perhaps the AT&T mail server, when it sees the 'nob...@myserver.com'
> treats it as spam and does not deliver the mail to even the 
> recipient's spam mailbox.
> 
> I am not sure if it is normal for outgoing SMTP mail servers to 
> automatically add the 'nob...@myserver.com' from address first in the 
> header, or even why it does so ? Does anybody know if this is normal 
> for mail servers to do this ? Evidently other incoming mail servers do

> not react to the 'nob...@myserver.com' in any way, so maybe AT&T is 
> unique in this.
> 
> Any light anyone can throw on the 'nob...@myserver.com' address would 
> be most welcome.

>It is using the apache user @ your host name as the default.  Try this:

>ini_set('sendmail_from', 'whate...@wherever.com');

You can also add headers to display custom formatted From: with a nice
display name, like this:

$to = "j...@user.com";
$subject = "Automated Notification";
$body = "Joe, you're using too much disk space!"; $headers = "From:
Automated Disk Notifications \n\rReply-to:
no-re...@website.com\n\r";

mail($to, $subject, $body, $headers);


EDIT:  Oops, didn't read OP.  Sorry!

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



RE: [PHP] Unable to send mail from PHP to AT&T e-mail address

2009-04-22 Thread kyle.smith
Edward Diener wrote:
> Phpster wrote:
>>
>>
>> On Apr 21, 2009, at 20:32, Edward Diener 
wrote:
>>
>>> I have a PHP script which uses the PHP 'mail' function. When the 
>>> script's 'to' address is an AT&T address, such as my own as an AT&T 
>>> ISP customer, the mail never gets to me. If the 'to' address is 
>>> anything other than an AT&T address, the mail gets to the recipient.
>>> The PHP code for sending the mail is essentially:
>>>
>>>$headers  = 'MIME-Version: 1.0' . "\r\n";
>>>$headers .= 'Content-type: text/html; charset=iso-8859-1' .
"\r\n";
>>>$headers .= 'From: Some From Name ';
>>>$to = 'mybellsouthaddress.net';
>>>$subject = 'Some Subject';
>>>$msg = 'Some Message';
>>>if(mail($to,$subject,$msg."\r\n\r\n",$headers))
>>>echo "good";
>>>else
>>>echo "bad";
>>>
>>> In the actual PHP script the $to, $subject, and $msg are 
>>> successfully passed to the script from the client side as $_POST, 
>>> $_POST and $_FILES parameters respectively. I have just filled them 
>>> in above so that they can be seen as if they were part of the 
>>> script. The script always returns "good", so the mail function must
be successful.
>>>
>>> In my project, testing has reported that any attempt to use the 
>>> 'mail' function on the server to send to an AT&T address fails to 
>>> reach the recipient, while all other addresses used in the testing 
>>> succeed in reaching the recipient. I can assert this to be the case 
>>> with my own AT&T address also. I have also checked my AT&T mailbox 
>>> online to make sure the mail is not being received as Spam.
>>>
>>> Does anybody have an idea why using the 'mail' function succeeds 
>>> with all but AT&T $to addresses ? Naturally in the client-server 
>>> application on which I am working, sending mail from the server must

>>> work for all $to addresses.
>>>
>>> --
>>> PHP General Mailing List (http://www.php.net/) To unsubscribe, 
>>> visit: http://www.php.net/unsub.php
>>>
>>
>> It might be that the server IP has been blacklisted with at&t as a 
>> domain  from which spam is sent.
> 
> I have found out that the server adds a from header of 
> 'nob...@myserver.com' where 'myserver' is the name of the server. This

> header gets placed first before the From header I supply in my PHP 
> script ( which should have had the form in the example above of 
> 'somefromn...@myserver.com, my bad ).
> 
> Perhaps the AT&T mail server, when it sees the 'nob...@myserver.com'
> treats it as spam and does not deliver the mail to even the 
> recipient's spam mailbox.
> 
> I am not sure if it is normal for outgoing SMTP mail servers to 
> automatically add the 'nob...@myserver.com' from address first in the 
> header, or even why it does so ? Does anybody know if this is normal 
> for mail servers to do this ? Evidently other incoming mail servers do

> not react to the 'nob...@myserver.com' in any way, so maybe AT&T is 
> unique in this.
> 
> Any light anyone can throw on the 'nob...@myserver.com' address would 
> be most welcome.

>It is using the apache user @ your host name as the default.  Try this:

>ini_set('sendmail_from', 'whate...@wherever.com');

You can also add headers to display custom formatted From: with a nice
display name, like this:

$to = "j...@user.com";
$subject = "Automated Notification";
$body = "Joe, you're using too much disk space!";
$headers = "From: Automated Disk Notifications
\n\rReply-to: no-re...@website.com\n\r";

mail($to, $subject, $body, $headers);

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



Re: [PHP] Unable to send mail from PHP to AT&T e-mail address

2009-04-22 Thread Shawn McKenzie
Edward Diener wrote:
> Phpster wrote:
>>
>>
>> On Apr 21, 2009, at 20:32, Edward Diener  wrote:
>>
>>> I have a PHP script which uses the PHP 'mail' function. When the
>>> script's 'to' address is an AT&T address, such as my own as an AT&T
>>> ISP customer, the mail never gets to me. If the 'to' address is
>>> anything other than an AT&T address, the mail gets to the recipient.
>>> The PHP code for sending the mail is essentially:
>>>
>>>$headers  = 'MIME-Version: 1.0' . "\r\n";
>>>$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
>>>$headers .= 'From: Some From Name ';
>>>$to = 'mybellsouthaddress.net';
>>>$subject = 'Some Subject';
>>>$msg = 'Some Message';
>>>if(mail($to,$subject,$msg."\r\n\r\n",$headers))
>>>echo "good";
>>>else
>>>echo "bad";
>>>
>>> In the actual PHP script the $to, $subject, and $msg are successfully
>>> passed to the script from the client side as $_POST, $_POST and
>>> $_FILES parameters respectively. I have just filled them in above so
>>> that they can be seen as if they were part of the script. The script
>>> always returns "good", so the mail function must be successful.
>>>
>>> In my project, testing has reported that any attempt to use the
>>> 'mail' function on the server to send to an AT&T address fails to
>>> reach the recipient, while all other addresses used in the testing
>>> succeed in reaching the recipient. I can assert this to be the case
>>> with my own AT&T address also. I have also checked my AT&T mailbox
>>> online to make sure the mail is not being received as Spam.
>>>
>>> Does anybody have an idea why using the 'mail' function succeeds with
>>> all but AT&T $to addresses ? Naturally in the client-server
>>> application on which I am working, sending mail from the server must
>>> work for all $to addresses.
>>>
>>> -- 
>>> PHP General Mailing List (http://www.php.net/)
>>> To unsubscribe, visit: http://www.php.net/unsub.php
>>>
>>
>> It might be that the server IP has been blacklisted with at&t as a
>> domain  from which spam is sent.
> 
> I have found out that the server adds a from header of
> 'nob...@myserver.com' where 'myserver' is the name of the server. This
> header gets placed first before the From header I supply in my PHP
> script ( which should have had the form in the example above of
> 'somefromn...@myserver.com, my bad ).
> 
> Perhaps the AT&T mail server, when it sees the 'nob...@myserver.com'
> treats it as spam and does not deliver the mail to even the recipient's
> spam mailbox.
> 
> I am not sure if it is normal for outgoing SMTP mail servers to
> automatically add the 'nob...@myserver.com' from address first in the
> header, or even why it does so ? Does anybody know if this is normal for
> mail servers to do this ? Evidently other incoming mail servers do not
> react to the 'nob...@myserver.com' in any way, so maybe AT&T is unique
> in this.
> 
> Any light anyone can throw on the 'nob...@myserver.com' address would be
> most welcome.

It is using the apache user @ your host name as the default.  Try this:

ini_set('sendmail_from', 'whate...@wherever.com');


-- 
Thanks!
-Shawn
http://www.spidean.com

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



Re: [PHP] Unable to send mail from PHP to AT&T e-mail address

2009-04-22 Thread Edward Diener

Phpster wrote:



On Apr 21, 2009, at 20:32, Edward Diener  wrote:

I have a PHP script which uses the PHP 'mail' function. When the 
script's 'to' address is an AT&T address, such as my own as an AT&T 
ISP customer, the mail never gets to me. If the 'to' address is 
anything other than an AT&T address, the mail gets to the recipient. 
The PHP code for sending the mail is essentially:


   $headers  = 'MIME-Version: 1.0' . "\r\n";
   $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
   $headers .= 'From: Some From Name ';
   $to = 'mybellsouthaddress.net';
   $subject = 'Some Subject';
   $msg = 'Some Message';
   if(mail($to,$subject,$msg."\r\n\r\n",$headers))
   echo "good";
   else
   echo "bad";

In the actual PHP script the $to, $subject, and $msg are successfully 
passed to the script from the client side as $_POST, $_POST and 
$_FILES parameters respectively. I have just filled them in above so 
that they can be seen as if they were part of the script. The script 
always returns "good", so the mail function must be successful.


In my project, testing has reported that any attempt to use the 'mail' 
function on the server to send to an AT&T address fails to reach the 
recipient, while all other addresses used in the testing succeed in 
reaching the recipient. I can assert this to be the case with my own 
AT&T address also. I have also checked my AT&T mailbox online to make 
sure the mail is not being received as Spam.


Does anybody have an idea why using the 'mail' function succeeds with 
all but AT&T $to addresses ? Naturally in the client-server 
application on which I am working, sending mail from the server must 
work for all $to addresses.


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



It might be that the server IP has been blacklisted with at&t as a 
domain  from which spam is sent.


I have found out that the server adds a from header of
'nob...@myserver.com' where 'myserver' is the name of the server. This 
header gets placed first before the From header I supply in my PHP 
script ( which should have had the form in the example above of 
'somefromn...@myserver.com, my bad ).


Perhaps the AT&T mail server, when it sees the 'nob...@myserver.com' 
treats it as spam and does not deliver the mail to even the recipient's 
spam mailbox.


I am not sure if it is normal for outgoing SMTP mail servers to 
automatically add the 'nob...@myserver.com' from address first in the 
header, or even why it does so ? Does anybody know if this is normal for 
mail servers to do this ? Evidently other incoming mail servers do not 
react to the 'nob...@myserver.com' in any way, so maybe AT&T is unique 
in this.


Any light anyone can throw on the 'nob...@myserver.com' address would be 
most welcome.


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



Re: [PHP] Unable to send mail from PHP to AT&T e-mail address

2009-04-22 Thread Richard Quadling
2009/4/22 Edward Diener :
> scubak1w1 wrote:
>>
>> "Edward Diener"  wrote in message
>> news:d9.64.21597.c829e...@pb1.pair.com...
>>>
>>> Chris wrote:

 kranthi wrote:
>
> of u are sure that the mail was not received as spam...
>
> check the log files of the mail server on the server to be sure that
> the mail actually reached the mail server from the http server

 Somehow I doubt AT&T gives out that sort of access ;)
>>>
>>> Exactly.
>>>
 The idea is right if you have access to both servers though.
>>>
>>> As you suggested, I can check my own server but I doubt I can get access
>>> to AT&T's incoming mail server.
>>
>> AT&T is potentially using one of the BLs such as SCBLs...
>>
>> Try going to, say, http://www.senderbase.org/, enter the IP and then on
>> the listings page try the DNS-based blocklists [Show/Hide all] links
>
> I pinged the domain part of the 'from' email for the sending server and got
> back an IP address. I entered that IP address at http://www.senderbase.org/
> and received a 'Neutral' reputation score with 'no information' found from
> whois and 'unknown' found for information about the network.
>
> I am not sure what final IP address the mail server is using to send out
> e-mail but 7 addresses starting with the first 3 parts of the IP were listed
> as addresses and all showed 0 DNSBL listings and 'Neutral' SBRS. Needless to
> say no spam is being sent from the mail addresses, since it is used by the
> server as part of a legitimate client-server program.
>
> Also bl.spamcop.net shows nothing for the IP address.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

What output do you get from ...

nslookup -q=mx put_the_domain_here.com

e.g.

nslookup -q=mx google.com

Server:  bv-vm-svr-1.[srcubbed].local
Address:  10.0.30.1

google.com  MX preference = 10, mail exchanger = smtp3.google.com
google.com  MX preference = 10, mail exchanger = smtp4.google.com
google.com  MX preference = 10, mail exchanger = smtp1.google.com
google.com  MX preference = 10, mail exchanger = smtp2.google.com
google.com  nameserver = ns3.google.com
google.com  nameserver = ns1.google.com
google.com  nameserver = ns4.google.com
google.com  nameserver = ns2.google.com
smtp1.google.cominternet address = 209.85.237.25
smtp2.google.cominternet address = 64.233.165.25
smtp3.google.cominternet address = 209.85.137.25
smtp4.google.cominternet address = 72.14.221.25
ns1.google.com  internet address = 216.239.32.10
ns2.google.com  internet address = 216.239.34.10
ns3.google.com  internet address = 216.239.36.10
ns4.google.com  internet address = 216.239.38.10

As you can see there are MANY servers set up to receive SMTP mail for google.com

None of them are the same as the IP you see when you ...

ping google.com

Pinging google.com [74.125.45.100] with 32 bytes of data:

Reply from 74.125.45.100: bytes=32 time=104ms TTL=239
Reply from 74.125.45.100: bytes=32 time=103ms TTL=239
Reply from 74.125.45.100: bytes=32 time=105ms TTL=239
Reply from 74.125.45.100: bytes=32 time=104ms TTL=239

Ping statistics for 74.125.45.100:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 103ms, Maximum = 105ms, Average = 104ms



-- 
-
Richard Quadling
Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731
"Standing on the shoulders of some very clever giants!"

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



Re: [PHP] Unable to send mail from PHP to AT&T e-mail address

2009-04-22 Thread Edward Diener

scubak1w1 wrote:
"Edward Diener"  wrote in message 
news:d9.64.21597.c829e...@pb1.pair.com...

Chris wrote:

kranthi wrote:

of u are sure that the mail was not received as spam...

check the log files of the mail server on the server to be sure that
the mail actually reached the mail server from the http server

Somehow I doubt AT&T gives out that sort of access ;)

Exactly.


The idea is right if you have access to both servers though.
As you suggested, I can check my own server but I doubt I can get access 
to AT&T's incoming mail server.


AT&T is potentially using one of the BLs such as SCBLs...

Try going to, say, http://www.senderbase.org/, enter the IP and then on the 
listings page try the DNS-based blocklists [Show/Hide all] links


I pinged the domain part of the 'from' email for the sending server and 
got back an IP address. I entered that IP address at 
http://www.senderbase.org/ and received a 'Neutral' reputation score 
with 'no information' found from whois and 'unknown' found for 
information about the network.


I am not sure what final IP address the mail server is using to send out 
e-mail but 7 addresses starting with the first 3 parts of the IP were 
listed as addresses and all showed 0 DNSBL listings and 'Neutral' SBRS. 
Needless to say no spam is being sent from the mail addresses, since it 
is used by the server as part of a legitimate client-server program.


Also bl.spamcop.net shows nothing for the IP address.

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



Re: [PHP] Unable to send mail from PHP to AT&T e-mail address

2009-04-21 Thread scubak1w1

"Edward Diener"  wrote in message 
news:d9.64.21597.c829e...@pb1.pair.com...
> Chris wrote:
>> kranthi wrote:
>>> of u are sure that the mail was not received as spam...
>>>
>>> check the log files of the mail server on the server to be sure that
>>> the mail actually reached the mail server from the http server
>>
>> Somehow I doubt AT&T gives out that sort of access ;)
>
> Exactly.
>
>>
>> The idea is right if you have access to both servers though.
>
> As you suggested, I can check my own server but I doubt I can get access 
> to AT&T's incoming mail server.

AT&T is potentially using one of the BLs such as SCBLs...

Try going to, say, http://www.senderbase.org/, enter the IP and then on the 
listings page try the DNS-based blocklists [Show/Hide all] links

If you are comfortable, email me the IP back channel, I am a user of SpamCop 
and can put it in their parser - it checks a bunch of BLs in oone swoop... 
(OR sign up for free at http://spamcop.net/anonsignup.shtml(I am just a 
user, in no way prompting their services...))

Here is the output for 121.185.154.247 for instance:


Parsing input: 121.185.154.247
[report history]
Routing details for 121.185.154.247
[refresh/show] Cached whois for 121.185.154.247 : kornet...@kt.co.kr 
ab...@kornet.net
Using abuse net on kornet...@kt.co.kr
abuse net kt.co.kr = postmas...@kt.co.kr, kornet...@kt.com, 
ab...@kornet.net, spam...@kisa.or.kr, ab...@kt.com, c...@certcc.or.kr, 
webmas...@kt.com
Using best contacts postmas...@kt.co.kr kornet...@kt.com ab...@kornet.net 
spam...@kisa.or.kr ab...@kt.com c...@certcc.or.kr webmas...@kt.com
c...@certcc.or.kr redirects to spamre...@certcc.or.kr

Statistics:
121.185.154.247 listed in bl.spamcop.net (127.0.0.2)
More Information..
121.185.154.247 not listed in dnsbl.njabl.org ( 127.0.0.8 )
121.185.154.247 not listed in dnsbl.njabl.org ( 127.0.0.9 )
121.185.154.247 listed in cbl.abuseat.org ( 127.0.0.2 )

Reporting addresses:
postmas...@kt.co.kr
kornet...@kt.com
ab...@kornet.net
spamre...@certcc.or.kr
spam...@kisa.or.kr
ab...@kt.com
webmas...@kt.com



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



Re: [PHP] Unable to send mail from PHP to AT&T e-mail address

2009-04-21 Thread Edward Diener

Chris wrote:

kranthi wrote:

of u are sure that the mail was not received as spam...

check the log files of the mail server on the server to be sure that
the mail actually reached the mail server from the http server


Somehow I doubt AT&T gives out that sort of access ;)


Exactly.



The idea is right if you have access to both servers though.


As you suggested, I can check my own server but I doubt I can get access 
to AT&T's incoming mail server.


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



Re: [PHP] Unable to send mail from PHP to AT&T e-mail address

2009-04-21 Thread Edward Diener

kranthi wrote:

of u are sure that the mail was not received as spam...

check the log files of the mail server on the server to be sure that
the mail actually reached the mail server from the http server


I doubt AT&T will give me access to the log files on their incoming mail 
server.


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



Re: [PHP] Unable to send mail from PHP to AT&T e-mail address

2009-04-21 Thread Edward Diener

Phpster wrote:



On Apr 21, 2009, at 20:32, Edward Diener  wrote:

I have a PHP script which uses the PHP 'mail' function. When the 
script's 'to' address is an AT&T address, such as my own as an AT&T 
ISP customer, the mail never gets to me. If the 'to' address is 
anything other than an AT&T address, the mail gets to the recipient. 
The PHP code for sending the mail is essentially:


   $headers  = 'MIME-Version: 1.0' . "\r\n";
   $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
   $headers .= 'From: Some From Name ';
   $to = 'mybellsouthaddress.net';
   $subject = 'Some Subject';
   $msg = 'Some Message';
   if(mail($to,$subject,$msg."\r\n\r\n",$headers))
   echo "good";
   else
   echo "bad";

In the actual PHP script the $to, $subject, and $msg are successfully 
passed to the script from the client side as $_POST, $_POST and 
$_FILES parameters respectively. I have just filled them in above so 
that they can be seen as if they were part of the script. The script 
always returns "good", so the mail function must be successful.


In my project, testing has reported that any attempt to use the 'mail' 
function on the server to send to an AT&T address fails to reach the 
recipient, while all other addresses used in the testing succeed in 
reaching the recipient. I can assert this to be the case with my own 
AT&T address also. I have also checked my AT&T mailbox online to make 
sure the mail is not being received as Spam.


Does anybody have an idea why using the 'mail' function succeeds with 
all but AT&T $to addresses ? Naturally in the client-server 
application on which I am working, sending mail from the server must 
work for all $to addresses.


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



It might be that the server IP has been blacklisted with at&t as a 
domain  from which spam is sent.


In that case I would have expected the spam to show up in my web mail 
spam folder. If AT&T is blacklisting the sending server IP without even 
delivering the mail to me as spam, I know of no way to find this out 
other than trying to talk to an AT&T representative.


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



Re: [PHP] Unable to send mail from PHP to AT&T e-mail address

2009-04-21 Thread Chris

kranthi wrote:

of u are sure that the mail was not received as spam...

check the log files of the mail server on the server to be sure that
the mail actually reached the mail server from the http server


Somehow I doubt AT&T gives out that sort of access ;)

The idea is right if you have access to both servers though.
--
Postgresql & php tutorials
http://www.designmagick.com/


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



Re: [PHP] Unable to send mail from PHP to AT&T e-mail address

2009-04-21 Thread kranthi
of u are sure that the mail was not received as spam...

check the log files of the mail server on the server to be sure that
the mail actually reached the mail server from the http server

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



Re: [PHP] Unable to send mail from PHP to AT&T e-mail address

2009-04-21 Thread Phpster



On Apr 21, 2009, at 20:32, Edward Diener  wrote:

I have a PHP script which uses the PHP 'mail' function. When the  
script's 'to' address is an AT&T address, such as my own as an AT&T  
ISP customer, the mail never gets to me. If the 'to' address is  
anything other than an AT&T address, the mail gets to the recipient.  
The PHP code for sending the mail is essentially:


   $headers  = 'MIME-Version: 1.0' . "\r\n";
   $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
   $headers .= 'From: Some From Name ';
   $to = 'mybellsouthaddress.net';
   $subject = 'Some Subject';
   $msg = 'Some Message';
   if(mail($to,$subject,$msg."\r\n\r\n",$headers))
   echo "good";
   else
   echo "bad";

In the actual PHP script the $to, $subject, and $msg are  
successfully passed to the script from the client side as $_POST,  
$_POST and $_FILES parameters respectively. I have just filled them  
in above so that they can be seen as if they were part of the  
script. The script always returns "good", so the mail function must  
be successful.


In my project, testing has reported that any attempt to use the  
'mail' function on the server to send to an AT&T address fails to  
reach the recipient, while all other addresses used in the testing  
succeed in reaching the recipient. I can assert this to be the case  
with my own AT&T address also. I have also checked my AT&T mailbox  
online to make sure the mail is not being received as Spam.


Does anybody have an idea why using the 'mail' function succeeds  
with all but AT&T $to addresses ? Naturally in the client-server  
application on which I am working, sending mail from the server must  
work for all $to addresses.


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



It might be that the server IP has been blacklisted with at&t as a  
domain  from which spam is sent.


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