September 30th, 1999, 04:56 PM
I'm pretty new to php. I've got a problem with the mail function. I can't get it to work. The rest of my php on the page works fine but the mail command doesn't send anything at all..
here's my code:
$date_mailed = date("D. F d, Y h:i:s a");
$subject = trim($subject);
mail("firstname.lastname@example.org", $subject , $message);
Any help would be appreciated!
October 1st, 1999, 04:24 PM
Your PHP code looks fine. I suspect you have a problem with your server's mail system.
Are you running Unix or Windows?
PHP doesn't have the ability to actually send the mail - it simply passes it on to your system's MTA (Mail Transfer Agent). If your MTA isn't configured properly, no mail will go out.
October 18th, 1999, 08:22 AM
I want to send mail from a MTA that's not on my local computer. The mail()-function will just try to send from my local computer. How do I get a connection to send from another computer?
(If it matters, I'm running an Apache in Windows and I want to send from a LINUX-machine.)