#1 (permalink)  
Old 10-10-2008, 03:28 PM
Registered User
 
Join Date: Oct 2008
Posts: 24
zerokarma is on a distinguished road
PHP email - not able to send externally

I'm having a problem with PHP email not sending externally, if the recepitant email is a local domain the email will be delivered without any problems but if put an external email address with a domain not on the server the email never seems to get there.

On the Tweak Setting it is already Unchecked for the "Prevent the user "nobody" from sending out mail to remote addresses" option.

I am also using suphp as the PHP5 handler.

I can't seem to figure this out, any ideas?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 10-10-2008, 04:00 PM
cPanelDavidG's Avatar
cPanel Technical Sales
 
Join Date: Nov 2006
Location: Houston, TX
Posts: 8,117
cPanelDavidG is on a distinguished road
Many mail providers (including many using cPanel/WHM) now perform sender verification on mail coming into their server from an external server to ensure the 'from' address on an email is an actual email address. If this is not an actual email address, it is discarded as spam. So make sure the 'from' is an actual email address.

There is also common speculation that a PHP script sending mail via SMTP is a better method of sending mail than relying on PHP's mail() function. In many contemporary distributed PHP scripts, all one has to do is change a few settings to switch from using mail() to using SMTP.
__________________
Need technical assistance? You can find your best avenue for support at: http://support.cPanel.net
-- cPanel David G., Lead Forum Administrator & cPanel Technical Sales Representative
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 10-10-2008, 04:10 PM
Registered User
 
Join Date: Oct 2008
Posts: 24
zerokarma is on a distinguished road
I dont think that is the issue in this case, I have access to the other server in which I am trying to send the email to. There is a special account on there where all spam gets dumped into I don't see any of the emails in there. After I try to send the email with the script it appears to work fine, no error notice or anything but it just never shows up at the other remote email. However when sending to a local email on the server it shows up fine.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 10-10-2008, 04:47 PM
cPanelDavidG's Avatar
cPanel Technical Sales
 
Join Date: Nov 2006
Location: Houston, TX
Posts: 8,117
cPanelDavidG is on a distinguished road
Quote:
Originally Posted by zerokarma View Post
I dont think that is the issue in this case, I have access to the other server in which I am trying to send the email to. There is a special account on there where all spam gets dumped into I don't see any of the emails in there. After I try to send the email with the script it appears to work fine, no error notice or anything but it just never shows up at the other remote email. However when sending to a local email on the server it shows up fine.
And it is only email from the script, not other email from your server, that is disappearing?
__________________
Need technical assistance? You can find your best avenue for support at: http://support.cPanel.net
-- cPanel David G., Lead Forum Administrator & cPanel Technical Sales Representative
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 10-10-2008, 04:59 PM
Registered User
 
Join Date: Oct 2008
Posts: 24
zerokarma is on a distinguished road
I believe its just the script/php mail

All the other mail seems to be perfectly fine sending remotely

One thing I did try was creating a forwarding email address that would send to the remote email. When I sent a test email to this forwarding email address it worked fine and I received the mail.

When I set the script to send the email to this forwarding email the email still never arrives at the remote email.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 10-10-2008, 05:11 PM
Registered User
 
Join Date: Oct 2008
Posts: 24
zerokarma is on a distinguished road
OK i was checking for errors and didn't find any intially but then found this:

Quote:
1 - s97_9stealth8_46@stealthcomputer.com R=lookuphost T=remote_smtp: SMTP error from remote mail server after MAIL FROM:<nobody@srv2.stealth.com> SIZE=2043: host mail.stealthcomputer.com [207.44.176.68]: 553 5.1.8 <nobody@srv2.stealth.com>... Domain of sender address nobody@srv2.stealth.com does not exist
What should I do to correct it?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 10-13-2008, 10:19 AM
cPanelDavidG's Avatar
cPanel Technical Sales
 
Join Date: Nov 2006
Location: Houston, TX
Posts: 8,117
cPanelDavidG is on a distinguished road
Quote:
Originally Posted by zerokarma View Post
OK i was checking for errors and didn't find any intially but then found this:



What should I do to correct it?
Have it send mail with a from address of a valid email address on your server rather than sending it as "nobody@srv2.stealth.com"

You may wish to consider using SMTP to send the mail if you are not sufficiently familiar with the PHP mail() function to do this.
__________________
Need technical assistance? You can find your best avenue for support at: http://support.cPanel.net
-- cPanel David G., Lead Forum Administrator & cPanel Technical Sales Representative
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #8 (permalink)  
Old 10-16-2008, 02:07 PM
Registered User
 
Join Date: Oct 2008
Posts: 24
zerokarma is on a distinguished road
Quote:
Originally Posted by cPanelDavidG View Post
Have it send mail with a from address of a valid email address on your server rather than sending it as "nobody@srv2.stealth.com"

You may wish to consider using SMTP to send the mail if you are not sufficiently familiar with the PHP mail() function to do this.
How do you change it from sending as "nobody@srv2.stealth.com"? Is it done at the script level or elsewhere?

How do you set PHP to send my SMTP? again is it at the script level or elsewhere?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #9 (permalink)  
Old 10-16-2008, 02:12 PM
cPanelDavidG's Avatar
cPanel Technical Sales
 
Join Date: Nov 2006
Location: Houston, TX
Posts: 8,117
cPanelDavidG is on a distinguished road
Quote:
Originally Posted by zerokarma View Post
How do you change it from sending as "nobody@srv2.stealth.com"? Is it done at the script level or elsewhere?
Short answer: the script level.

Long answer: you can have it be user@srv2.stealth.com (where user is their cPanel username) by using SuPHP since this will force scripts to execute as the user rather than user nobody.

Quote:
Originally Posted by zerokarma View Post
How do you set PHP to send my SMTP? again is it at the script level or elsewhere?
This is handled on the script level.
__________________
Need technical assistance? You can find your best avenue for support at: http://support.cPanel.net
-- cPanel David G., Lead Forum Administrator & cPanel Technical Sales Representative
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #10 (permalink)  
Old 10-16-2008, 02:43 PM
Registered User
 
Join Date: Aug 2002
Posts: 1,084
sparek-3 is on a distinguished road
In your PHP script when you call the mail() function, make use of the fifth parameter of PHP's mail function:

http://us3.php.net/manual/en/function.mail.php

PHP Code:
mail($to$subject$message$headers"-fsomerealaddress@example.com"); 
The somerealaddress@example.com address is the address that you want bounced return messages to come to. It needs to be a valid e-mail address, one that actually accepts mail.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #11 (permalink)  
Old 10-16-2008, 02:48 PM
Registered User
 
Join Date: Oct 2008
Posts: 24
zerokarma is on a distinguished road
Thanks I will try that
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 03:47 PM.


Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
© cPanel Inc