|
|||
|
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? |
|
||||
|
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 |
|
|||
|
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.
|
|
||||
|
Quote:
__________________
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 |
|
|||
|
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. |
|
|||
|
OK i was checking for errors and didn't find any intially but then found this:
Quote:
|
|
||||
|
Quote:
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 |
|
|||
|
Quote:
How do you set PHP to send my SMTP? again is it at the script level or elsewhere? |
|
||||
|
Quote:
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. 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 |
|
|||
|
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:
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|