Portal Home > Knowledgebase > Articles Database > Cannot send email outside my domain
Cannot send email outside my domain
Posted by raulgonzalez, 09-14-2010, 03:39 PM |
I have a php form that has been working fine for years. We've used it to send email confirmations or form data within our company.
Now our new project calls for a way to send email to email addresses outside our company. I tried using the same code but didn't work. To narrow it down I used a very simple example.
When I try to send email to an email address within our domain I get the "Message successfully sent" confirmation and I actually receive the email.
When I try to send email to an email address outside the domain I get the "Message delivery faild" message and the email never makes it to the destination.
any ideas on what I can use? would this have to be adjusted at the server level?
here is the code
|
Posted by REMX, 09-14-2010, 08:22 PM |
Could you try adding a 'FROM' address? It may be that your provider is preventing null senders for spam/abuse etc:
|
Posted by parky1, 09-15-2010, 06:12 PM |
In sendmail you have to edit the sendmail.cf to allow emails to be sent outside of the domain.
|
Posted by c10k_Consulting, 09-16-2010, 07:38 AM |
Also make sure you have reverse DNS setup - many times i have thought "hrmm mail isn't working" and it ends up being rDNS ;-)
|
Posted by gcs-Nilesh, 09-16-2010, 08:48 AM |
Also check if server is authenticate to send mail outside using script.
|
Add to Favourites Print this Article
Also Read