PHPMailer(): Called Mail() without being connected

后端 未结 1 455
不思量自难忘°
不思量自难忘° 2020-12-21 13:06


        
相关标签:
1条回答
  • 2020-12-21 13:29

    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>";
    
    0 讨论(0)
提交回复
热议问题