Emails are not Delivered to External Email Addresses

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
devarishi
Forum Contributor
Posts: 101
Joined: Fri Feb 05, 2010 7:15 pm

Emails are not Delivered to External Email Addresses

Post by devarishi »

Hi,

Code: Select all

 
<?php
mail("dk_mahadeva@yahoo.com,admin@InternalCompany.com,admin@ExternalCompany.com,", "Test Mail - Please Reply", "Test Mail");
?>
 
Using the function mail() of PHP I am able to send email along with attachment to email addresses which are Internal to our Organization.

Example: me@myCompany.com

But when I send an email to email addresses that are External to our Organization such as:

helpdesk@SomeOtherCompany.com

then it (the message for the External Email ID) remains in the "C:\Inetpub\mailroot\Queue" folder of the SMTP Server.

If I include both the email addresses still email is being sent to the internal email id but not to the external one.

I am observing that the message "NTFS_46d7ec1201caa8410000002d.EML" which has been lying Queued in the above folder for over 30 minutes by now. That means it won't be delivered at all.

I really need to do that because the whole wbe application which I have coded is meant for sending reports and if no email is sent to an externam email address then the project cannot be put to use.

Note: Just to restate, the above sample code doesn't send email to user@yahoo.com and user@ExternalCompany.com, but to user@InternalCompany.com

I have tried using VBScript (CDO.Message) in an ASP to accomplish the same task and the same result was produced. :banghead:

Has it to do with any Firewall Settings? I checked that too, though, and allowed SMTP to be used through Internet.

:banghead:

Can anyone help me with it, please?
devarishi
Forum Contributor
Posts: 101
Joined: Fri Feb 05, 2010 7:15 pm

Re: Emails are not Delivered to External Email Addresses

Post by devarishi »

Okay, I got it now! I am able to send emails to external domains as well. However, there is a problem with it: The Message of the Body is not sent! Only the attachment and the subject line are sent. In fact, the attachment is also not properly sent. Some Text is left out even though the text file has 2 lines!

I used some other SMTP Server which is being used in our project to send emails to external domains. They are UNIX/Linux Servers. So, I don't know how to handle them. I can't play with them.

So, I need to know how to configure SMT Services on Windows (IIS) so that it can relay emails to external domains as well.

Any help with this much only?
Post Reply