Hey, im trying to use the mail() function, but its not working. This is the script:

			echo "Success";
			echo "Failure";

I keep getting "Failure". Is there an issue with my syntax, or is it some other problem?

I'm running Ubuntu, and I've done nothing other than installing PHP to use the mail functions.

I think, the fourth is a header, and maybe you stated it wrong. Try to send without headers:

mail("somebody@example.com","My subject",My Bodytext);

And post here the result

Have you set up the SMTP setings in the PHP settings file?

Your mail function is perfectly fine. Does it give you any error other than "Failure" ? Umm..have you disabled error reporting ? Have you set sendmail path in php.ini ? usually, /usr/sbin/sendmail is the path for sendmail.