vang163 Posted July 7, 2008 Share Posted July 7, 2008 Hi, I'm using WAMP. I have set the SMTP value & smtp_port value in my php.ini to those values provided by my local ISP. The mail is send out, I think. Since i did not receive any error message and i receive the success notice after execution. The problem is I did not receive the email being send out!!!!!! Which part did i overlook? Below is my code: $to = '$email'; $subject = 'welcome'; $message = "hello"; $header = "From: [email protected]" . "\r\n"; if(mail($to, $subject, $message, $header)) { // if email is send successful header("location: success-notice.php"); exit(); } else // if email is not send { echo("An error occurred while sending you an email. Please contact the site administrator."); } Link to comment https://forums.phpfreaks.com/topic/113577-problem-receiving-email/ Share on other sites More sharing options...
DyslexicDog Posted July 7, 2008 Share Posted July 7, 2008 Does your isp require login for smtp? Link to comment https://forums.phpfreaks.com/topic/113577-problem-receiving-email/#findComment-583712 Share on other sites More sharing options...
vang163 Posted July 8, 2008 Author Share Posted July 8, 2008 my isp require login, can you show me the missing coding, thanks. Link to comment https://forums.phpfreaks.com/topic/113577-problem-receiving-email/#findComment-584136 Share on other sites More sharing options...
bluejay002 Posted July 8, 2008 Share Posted July 8, 2008 I think SMTP is still not enabled. Just a guess though Link to comment https://forums.phpfreaks.com/topic/113577-problem-receiving-email/#findComment-584174 Share on other sites More sharing options...
DyslexicDog Posted July 8, 2008 Share Posted July 8, 2008 my isp require login, can you show me the missing coding, thanks. I'm not going to write your code for you, you need to do some more reading. I'm just pointing you in a direction, you have to try walking it. Link to comment https://forums.phpfreaks.com/topic/113577-problem-receiving-email/#findComment-584180 Share on other sites More sharing options...
vicodin Posted July 8, 2008 Share Posted July 8, 2008 Alot of ISP's block port 25 and port 80 so you cant host a web server without paying. Try to telnet into your smtp server and send an email that way to like a gmail account, if it works then its something is wrong with the code, if it doesnt that your isp is blocking you or somethings wrong with your smtp. Get a packet sniffer and that will tell you if it let your network with out any errors to. If you dont know how to telnet then google "send email from telnet" it will show you how to. Link to comment https://forums.phpfreaks.com/topic/113577-problem-receiving-email/#findComment-584190 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.