0
發送電子郵件,我有以下的代碼來發送電子郵件:PHP郵件,Gmail的SMTP不活的服務器
$mail->IsSMTP();
$mail->Host = 'imap.gmail.com';
$mail->SMTPAuth = true;
$mail->Username = 'my gmail id';
$mail->Password = 'mypassword';
$mail->SetFrom('[email protected]', 'Bilafon');
$mail->Subject = $subject;
$mail->AltBody = 'To view the message, please use an HTML compatible email viewer!';
$mail->MsgHTML($body);
$mail->AddAddress($email_id, $user_name);
return $mail->Send();
其從本地主機而不是從活的服務器發送電子郵件。直播服務器時,它顯示了這個錯誤:
SMTP Error: Could not authenticate
任何形式的幫助表示讚賞