Jump to content

Problem receiving email


vang163

Recommended Posts

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

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.

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.