Is my server enabled for sending mail?

Hi there, thanks for reading this. I am totally new to PHP and think I may be doing something very basic wrong. I am trying to set up sending email using php and flash, I have read the Senocular tutorial 3 times and have read all relevant posts on the forums but still can’t seem to get anywhere; everything works fine, the thankyou page displays but no email appears in my inbox.

I decided to go back to bascis and see if my server will send email at all, never mind from Flash, I have checked the tutorial at www.sephiroth.it on flash PHP and email and it says to test if your server will send email put this code in a PHP file:

[INDENT]<?
mail("myname@gmail.com",“test”,“Ok, it works”);
?> [/INDENT]

I have done this in Dreamweaver, getting rid of all of the other text in the code section and have uploaded the php file to my server but I still don’t get any mail after i have visited the page. My gmail isn’t filtering the messages or marking them as spam so I am not sure what is wrong. I have checked with the hosting company (fasthosts) and they support this kind of script so I have no clue where the problem is.

I would be really grateful if anyone could help me sort this as it is drving me mad!

Many thanks for any help

do you have the ability to check out the php.ini file?

Thanks for the super-quick reply SlowRoasted, I don’t even know what the php.ini file is or where to find it I am afraid, could you possibly direct me?

If you don’t have root access to the server then you prob can’t see the php.ini file. Its the file that sets all the settings for php. It could be in several different places on your server, best to do a search for it.

I have put some code in my php file so it now looks like this:

<?
ini_set(“sendmail_from”, " postmaster@myserverdomain.co.uk “);
mail("myname@gmail.com”,“test”,“Ok, it works”);
?>

It looks like i had to set a sent from address that was on the same server domain to make the server send the mail.
Now I just have to see if I can get the flash program to work :wink:

Thanks SlowRoasted for all your help :slight_smile:

np, I had this problem in the past:P