if(mail("$to", "$subject", "$msg", "$headers")){
echo "發送成功";
}else{
ini_set("SMTP","192.168.0.99"); //備用的SMTP .99只是舉例
if(mail("$to", "$subject", "$msg", "$headers")){
echo "發送成功";
}else{
echo "發送失敗"; //兩個SMTP都掛掉的狀況... 機率很低
}
}
No comments:
Post a Comment