boldspud Posted June 8, 2010 Share Posted June 8, 2010 I am no expert in php, but I have done enough research to know that my code is not the problem in this instance. I am simply trying to get the mail() function working to set up a webform on a website. Here is the code I'm using : <?php $Name = "Da Duder"; $email = "[email protected]"; $recipient = "[email protected]"; $mail_body = "The text for the mail..."; $subject = "Subject for reviever"; $header = "From: ". $Name . " <" . $email . ">\r\n"; ini_set('sendmail_from', '[email protected]'); mail($recipient, $subject, $mail_body, $header); ?> So how do I track down the error in this function non-functionality? Again, I'm new to this, so apologies if this is super easy. Link to comment https://forums.phpfreaks.com/topic/204220-mail-function-troubleshooting/ Share on other sites More sharing options...
xcandiottix Posted June 8, 2010 Share Posted June 8, 2010 Does it work if you take out the line: ini_set('sendmail_from', '[email protected]'); I've never seen that in a mail function before... but I could use that if it works! Link to comment https://forums.phpfreaks.com/topic/204220-mail-function-troubleshooting/#findComment-1069641 Share on other sites More sharing options...
boldspud Posted June 8, 2010 Author Share Posted June 8, 2010 Just tried it. Didn't help, unfortunately That was a line I found online, that people said could help someone with a similar problem. Link to comment https://forums.phpfreaks.com/topic/204220-mail-function-troubleshooting/#findComment-1069645 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.