mimintweak Posted October 25, 2009 Share Posted October 25, 2009 Hi Guys, I maintain 3 sites (including my own) I use the following code from a french webmaster that gave me permission to use it. He designed & coded one of them. Now the code seems to have stopped working for some reason, Is that usual? <?php $entetes = "From: $_POST[sender]" ; $destinataire = "[email protected]"; $send_mail = mail($destinataire, $_POST[subject], $_POST[Message],$entetes); if (!$send_mail) { echo "<p>Error while sending. Please contact us by phone.</p>" ; } else { echo "<p>Your message has been sent successfully. Thank You for contacting us.</p>" ; } ?> I would translate the french words if I was sure of what they meant, not sure what entetes is but assume destinaire is destination. Appreciate any help Link to comment https://forums.phpfreaks.com/topic/178989-sendmail-code-suddenly-not-working/ Share on other sites More sharing options...
mimintweak Posted October 26, 2009 Author Share Posted October 26, 2009 Any idea why it would just stop working? It has been working well for 12 months. Please someone take pity on me, not great with php. Is it because of my age. I am a senior Link to comment https://forums.phpfreaks.com/topic/178989-sendmail-code-suddenly-not-working/#findComment-944418 Share on other sites More sharing options...
Bendude14 Posted October 26, 2009 Share Posted October 26, 2009 I presume entetes is is "email" You could look into the 5th parameter to the mail function, if they have upgraded your server this could be the problem. php.net/mail Link to comment https://forums.phpfreaks.com/topic/178989-sendmail-code-suddenly-not-working/#findComment-944599 Share on other sites More sharing options...
mimintweak Posted October 26, 2009 Author Share Posted October 26, 2009 Thanks for your help! I will google 5th parameter (never heard of it) Link to comment https://forums.phpfreaks.com/topic/178989-sendmail-code-suddenly-not-working/#findComment-945033 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.