Dragen Posted June 16, 2007 Share Posted June 16, 2007 Hi, I've been using wamp to test my site and have bumped into a problem. Does anyone know if wamp can handle the mail() function or if I need to set it up? I'm trying to test a contact form, but the file that actually sends the data is identical to one I'm using on my site with no glitches. Every time I try it on wamp I get an error saying the message couldn't be sent. I'm using this code to send it: if (mail($recipient, $subject, $message, $headers)){ echo '<p align="center">Thank you<br />Your message has been successfully sent</p>We will get back to you as soon as possible.'; } else echo '<p align="center">An error occurred and the message could not be sent.<br /><a href="javascript:history.go(-1);">please try again</a></p>'; and it always outputs An error occurred and the message could not be sent. I tried echoing $recipient, $subject, $message and $headers to check that they were being sent and they were, so I presume the mail() function doesn't work on wamp.. Link to comment https://forums.phpfreaks.com/topic/55829-solved-mail-using-wamp/ Share on other sites More sharing options...
chigley Posted June 16, 2007 Share Posted June 16, 2007 For starters, mail() doesn't always return true/false based on whether the mail was sent or not. I'm not sure how you'd go about configuring WAMP to send mails, something to do with SMTP. Link to comment https://forums.phpfreaks.com/topic/55829-solved-mail-using-wamp/#findComment-275785 Share on other sites More sharing options...
Dragen Posted June 16, 2007 Author Share Posted June 16, 2007 okay. Thanks for the help! Link to comment https://forums.phpfreaks.com/topic/55829-solved-mail-using-wamp/#findComment-275792 Share on other sites More sharing options...
PC Nerd Posted June 16, 2007 Share Posted June 16, 2007 um, i dont know about wamp, however the "next version" xampp comes with mercury mail server, which woudl allow you to setup the SMTP etc for your server... however ive never used it so i dont know much more.. gdlk Link to comment https://forums.phpfreaks.com/topic/55829-solved-mail-using-wamp/#findComment-275797 Share on other sites More sharing options...
Dragen Posted June 16, 2007 Author Share Posted June 16, 2007 thanks, I'll take a look Link to comment https://forums.phpfreaks.com/topic/55829-solved-mail-using-wamp/#findComment-275799 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.