chiprivers Posted November 26, 2006 Share Posted November 26, 2006 I have not used the mail() function before within PHP and wondering where I should get started. I am OK with the use of mail() but not sure what I need to do to get server ready. I have BigApache installed on my computer for testing my scripts and I believe it is installed with Mercury mail. What do I need to do to get it ready to send mail?I am running this little test script:<?php$result = mail("[email protected]","Test Message","Hello");if ($result) {echo "accepted";} else {echo "failed";}?>At the moment I am just getting "failed". Link to comment https://forums.phpfreaks.com/topic/28515-whilst-everybody-is-talking-about-mailing/ Share on other sites More sharing options...
lawnninja Posted November 26, 2006 Share Posted November 26, 2006 Ya I'm trying to figure out more on the msil function myself ;DTry this code instead. ;)<?php$to = "[email protected]";$subject = "email function" ;$message = "Hi" ;$from = "[email protected]";$headers = "From: $from";mail($to,$subject,$message,$headers);echo "Mail Sent.";?> Link to comment https://forums.phpfreaks.com/topic/28515-whilst-everybody-is-talking-about-mailing/#findComment-130512 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.