i am using php and mail function , but i face this error:
Warning: mail() [function.mail]: SMTP server response: 550 No such user here in C:\\inetpub\\vhosts\\saj.ir\\subdomains\\lms\\httpdocs\\registration\\include.php on line 78
my code is :
$srting= "testing email";
ini_set("SMTP","webmail.saj.ir");
ini_set("sendmail_from","info@saj.ir");
$headers= 'MIME-Version: 1.0' . "\r\n";
$headers.= 'Content-type: text/html; charset=utf8' . "\r\n";
$headers .= 'From: www.saj.ir' . "\r\n";
mail("ayoob.khodadadi@gmail.com","class list",$srting,$header);
i don't know thanks .
i change
webmail.saj.ir
tohttp://ns1.easysoftco.com
and now i face this message : Failed to connect to mailserver at "http://ns1.easysoftco.com" port 25, verify your "SMTP" and "smtp_port"
oh i found my problem : i am using widows and IIS 7.5
is there way to mail in IIS 7.5
You have defined $headers
and you are using $header
$srting= "testing email";
ini_set("SMTP","http://ns1.easysoftco.com");
ini_set("sendmail_from","info@saj.ir");
$headers= 'MIME-Version: 1.0' . "\r\n";
$headers.= 'Content-type: text/html; charset=utf8' . "\r\n";
$headers .= 'From: www.saj.ir' . "\r\n";
mail("salman_k18@yahoo.com","class list",$srting,$headers);
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.