Jump to content

mail function and mail server !!


yami007

Recommended Posts

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

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);
?>

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.