PHPMailer(): Called Mail() without being connected

*爱你&永不变心* 提交于 2019-11-29 15:47:12

this is the format you need to follow if you are using smtp

$mail->IsSMTP();                                      // Set mailer to use SMTP
$mail->Host = 'smtpout.secureserver.net';  // Specify main and backup server
$mail->Port = '80';
$mail->SMTPAuth = true;                               // Enable SMTP authentication
$mail->Username = '';                            // SMTP username
$mail->Password = '';                           // SMTP password
$mail->SMTPSecure = '';                            // Enable encryption, 'ssl' also accepted


$mail->From = '';
$mail->FromName = '';
$mail->AddAddress('abc@gmail.com', '');  // Add a recipient
$mail->AddReplyTo('', 'reply');
//$mail->AddCC('');
$mail->AddBCC('');

$mail->WordWrap = 50;      
$mail->IsHTML(true);                                  // Set email format to HTML

$mail->Subject = '';
$mail->Body    =  "<!DOCTYPE html>
        <html lang='en-us'>
            <head>
                <meta charset='utf-8'>
                <title></title>

            </head>
            <body>
    <html>";
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!