伙计我得到他的错误它正在工作@ localhost但在我的主机上不起作用
http://myownprojects.co.nf/ ??
$mail = new PHPMailer;
$mail->IsSMTP();
$mail->SMTPAuth = true;
$mail->Host = 'smtp.gmail.com';
$mail->SMTPSecure = "ssl";
$mail->Port = 465;
$mail->IsHTML(true);
$mail->Username = "webdeveloper.hadi@gmail.com";
$mail->Password = '**********';
$mail->setFrom("webdeveloper.hadi@gmail.com");
$mail->Subject= "Your confirmation Mail";
$mail->AddEmbeddedImage('images/me.jpg', 'meimg', 'images/me.jpg');
$mail->Body = "Please click on the link";
$mail->addAddress(webdeveloper.hadi@gmail.com);
if($mail->Send()){
}else{
}
答案 0 :(得分:0)
尝试以下方法:
$mail->SMTPSecure = "tls";
$mail->Port = 587;