tags:

views:

28

answers:

1

Hi,

I need to install a PHP site on a Microsoft server. For some reason the host isn't allowing the site to send e-mails. The host has sent me a code sample... which didn't work.

Is there a way to check if the server allows sending of e-mails through the php mail() function?

At this stage it is all about finger pointing and I need some proof here to show the client that the host is at fault.

A: 

You can setup a condition like this whether or not the mail worked:

if (!mail(......)){
  // mail was not sent....
}

Or:

mail(......) or die('Could not send the email !!');
Sarfraz
It is important to note that just because the mail was accepted for delivery, it does NOT mean the mail will actually reach the intended destination.
Gordon
@Gordon: Yes that's true ;)
Sarfraz