yami007 Posted August 4, 2009 Share Posted August 4, 2009 i just got the chance to install a mail server and got rid of that error:: Warning: mail() [function.mail]: Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\AppServ\www\company3\includes\send_password_to_email.php on line 21 and a new error comes :: Warning: mail() [function.mail]: SMTP server response: 501 Syntax Error: Unbalanced angle brackets in C:\AppServ\www\company3\includes\send_password_to_email.php on line 21 now i dont know what to do !! your help is much appreciated Link to comment https://forums.phpfreaks.com/topic/168747-mail-function-and-mail-server/ Share on other sites More sharing options...
kenrbnsn Posted August 4, 2009 Share Posted August 4, 2009 Code please. Ken Link to comment https://forums.phpfreaks.com/topic/168747-mail-function-and-mail-server/#findComment-890288 Share on other sites More sharing options...
yami007 Posted August 4, 2009 Author Share Posted August 4, 2009 well, sorry here's my code :: <?php $site = 'www.example.net'; $webmaster = 'yami'; $myemail = '[email protected]'; $headers = "From: $site\n"; $headers .= "<$myemail>\nX-Mailer:PHP/" . phpversion(); $subject = "تذكير بكلمة المرور"; $message = "Dear $f_name, we sent you this e-mail because you might have forgotten your password. To continue, just click on the link below: http://$site/reset_password.php?$confirm_code Please print this information out and store it for future reference. Thanks, $webmaster"; mail($email, $subject, $message, $headers); ?> Link to comment https://forums.phpfreaks.com/topic/168747-mail-function-and-mail-server/#findComment-890289 Share on other sites More sharing options...
yami007 Posted August 4, 2009 Author Share Posted August 4, 2009 oh i got rid of the error, and the function works but i dont receive any e-mail what can be the cause? Link to comment https://forums.phpfreaks.com/topic/168747-mail-function-and-mail-server/#findComment-890296 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.