Ankündigung

Einklappen
Keine Ankündigung bisher.

[Erledigt] phpMailer PHP4: SMTP Fehlermeldung

Einklappen

Neue Werbung 2019

Einklappen
X
  • Filter
  • Zeit
  • Anzeigen
Alles löschen
neue Beiträge

  • [Erledigt] phpMailer PHP4: SMTP Fehlermeldung

    UPDATE: Ich habe vergessen, dass ich die Emailadresse per POST und nicht aus der Datenbank bekomme, daher wurde PHP Mailer keine Emailadresse übergeben.

    Thread kann gelöscht werden.

    ---


    Hallo,

    ich habe jetzt auf Anraten meine mail() durch den phpmailer ausgetauscht, jedoch habe ich nur PHP4 auf dem Server. Jedenfalls funktioniert es im einen Skript super, im anderen nicht.

    Wäre super, wenn da jemand mal drüberschauen könnte.

    Funktionierendes Skript:
    PHP-Code:
    $mail = new PHPMailer();
        
        
        
    $mail->SMTPDebug PHP_INT_MAX;

        
    $mail->IsSMTP();                                      // set mailer to use SMTP
        
    $mail->Host $mailer_host;  // specify main and backup server
        
    $mail->SMTPAuth true;     // turn on SMTP authentication
        
    $mail->Username $mailer_user;  // SMTP username
        
    $mail->Password $mailer_passwd // SMTP password
        
        
    $mail->From $mailer_from;
        
    $mail->FromName $mailer_fromName;
        
    $mail->AddAddress($l['nl_email'], $l['nl_name']);
        
        
    $mail->WordWrap 70
        if (
    $anhang != '')
            
    $mail->AddAttachment('../_download/'.$anhang);         // add attachments
        
    $mail->IsHTML(true);                                  // set email format to HTML
        
        
    $mail->Subject $_POST['titel'];
        
    $mail->Body    '
        <html>
         <head></head>
         <body>
         '
    .$emailtext.'<br /><br /><br /><br />Wenn Sie den Newsletter abbestellen m&ouml;chten, klicken Sie bitte <a href="'.$url_zu_basisordner.'index.php?spezial=newsletter4&id='.$l['nl_id'].'&name='.md5($l['nl_name']).'">hier</a>.<br />
          </body>
        </html>'
    ;
        
    $mail->AltBody "
        <html>
         <head></head>
         <body>
         "
    .$emailtext."<br /><br /><br /><br />Wenn Sie den Newsletter abbestellen m&ouml;chten, klicken Sie bitte auf: ".$url_zu_basisordner."index.php?spezial=newsletter4&id=".$l['nl_id']."&name=".md5($l['nl_name'])."\n";
        
        if(!
    $mail->Send())
        {
            echo 
    ' <span class="panik">Fehler!</span>: ';
           echo 
    $mail->ErrorInfo;
           exit;
        }
        else {
            echo 
    ' <span class="antipanik">Fertig</span>';
        } 
    Ausgabe bei MAX-DEBUG:

    Code:
    SMTP -> get_lines(): $data was ""
    SMTP -> get_lines(): $str is "220 smtp123.mail.ukl.yahoo.com ESMTP
    "
    SMTP -> get_lines(): $data is "220 smtp123.mail.ukl.yahoo.com ESMTP
    "
    SMTP -> FROM SERVER:
    220 smtp123.mail.ukl.yahoo.com ESMTP
    SMTP -> get_lines(): $data was ""
    SMTP -> get_lines(): $str is "250-smtp123.mail.ukl.yahoo.com
    "
    SMTP -> get_lines(): $data is "250-smtp123.mail.ukl.yahoo.com
    "
    SMTP -> get_lines(): $data was "250-smtp123.mail.ukl.yahoo.com
    "
    SMTP -> get_lines(): $str is "250-AUTH LOGIN PLAIN XYMCOOKIE
    "
    SMTP -> get_lines(): $data is "250-smtp123.mail.ukl.yahoo.com
    250-AUTH LOGIN PLAIN XYMCOOKIE
    "
    SMTP -> get_lines(): $data was "250-smtp123.mail.ukl.yahoo.com
    250-AUTH LOGIN PLAIN XYMCOOKIE
    "
    SMTP -> get_lines(): $str is "250-PIPELINING
    "
    SMTP -> get_lines(): $data is "250-smtp123.mail.ukl.yahoo.com
    250-AUTH LOGIN PLAIN XYMCOOKIE
    250-PIPELINING
    "
    SMTP -> get_lines(): $data was "250-smtp123.mail.ukl.yahoo.com
    250-AUTH LOGIN PLAIN XYMCOOKIE
    250-PIPELINING
    "
    SMTP -> get_lines(): $str is "250 8BITMIME
    "
    SMTP -> get_lines(): $data is "250-smtp123.mail.ukl.yahoo.com
    250-AUTH LOGIN PLAIN XYMCOOKIE
    250-PIPELINING
    250 8BITMIME
    "
    SMTP -> FROM SERVER: 
    250-smtp123.mail.ukl.yahoo.com
    250-AUTH LOGIN PLAIN XYMCOOKIE
    250-PIPELINING
    250 8BITMIME
    SMTP -> get_lines(): $data was ""
    SMTP -> get_lines(): $str is "334 VXNlcm5hbWU6
    "
    SMTP -> get_lines(): $data is "334 VXNlcm5hbWU6
    "
    SMTP -> get_lines(): $data was ""
    SMTP -> get_lines(): $str is "334 UGFzc3dvcmQ6
    "
    SMTP -> get_lines(): $data is "334 UGFzc3dvcmQ6
    "
    SMTP -> get_lines(): $data was ""
    SMTP -> get_lines(): $str is "235 OK, go ahead
    "
    SMTP -> get_lines(): $data is "235 OK, go ahead
    "
    SMTP -> get_lines(): $data was ""
    SMTP -> get_lines(): $str is "250 OK , completed
    "
    SMTP -> get_lines(): $data is "250 OK , completed
    "
    SMTP -> FROM SERVER:
    250 OK , completed
    SMTP -> get_lines(): $data was ""
    SMTP -> get_lines(): $str is "250 OK , completed
    "
    SMTP -> get_lines(): $data is "250 OK , completed
    "
    SMTP -> FROM SERVER:
    250 OK , completed
    SMTP -> get_lines(): $data was ""
    SMTP -> get_lines(): $str is "354 Start Mail. End with CRLF.CRLF
    "
    SMTP -> get_lines(): $data is "354 Start Mail. End with CRLF.CRLF
    "
    SMTP -> FROM SERVER:
    354 Start Mail. End with CRLF.CRLF
    SMTP -> get_lines(): $data was ""
    SMTP -> get_lines(): $str is "250 OK , completed
    "
    SMTP -> get_lines(): $data is "250 OK , completed
    "
    SMTP -> FROM SERVER:
    250 OK , completed
    SMTP -> get_lines(): $data was ""
    SMTP -> get_lines(): $str is "221 Service Closing transmission
    "
    SMTP -> get_lines(): $data is "221 Service Closing transmission
    "
    SMTP -> FROM SERVER:
    221 Service Closing transmission

    Skript, dass die Fehlermeldung „SMTP Error: The following SMTP Error: Data not accepted.“ auswirft:

    PHP-Code:
    $mail = new PHPMailer();
        
        
    $mail->SMTPDebug PHP_INT_MAX;

        
    $mail->IsSMTP();                                      // set mailer to use SMTP
        
    $mail->Host $mailer_host;  // specify main and backup server
        
    $mail->SMTPAuth true;     // turn on SMTP authentication
        
    $mail->Username $mailer_user;  // SMTP username
        
    $mail->Password $mailer_passwd // SMTP password
        
        
        
    $mail->From $mailer_from;
        
    $mail->FromName $mailer_fromName;
        
    $mail->AddAddress($l['nl_email'], $l['nl_name']);
        
        
    $mail->WordWrap 70;
        
    $mail->IsHTML(true);
        
        
    $mail->Subject 'Freischaltung Newsletter';
        
    $mail->Body    '
        <html>
         <head></head>
         <body>
         Guten Tag '
    .$nl_name.',<br /><br />Sie haben sich auf unserer Internetseite f&uuml;r unseren kostenlosen Newsletter registriert. Zur Best&auml;tigung, dass es sich um die korrekte E-Mail Adresse handelt, klicken Sie bitte auf den folgenden Link, um den Newsletter zu erhalten:<br /><br /><a href="'.$url_zu_basisordner.'index.php?spezial=newsletter3&id='.$insert_id.'&name='.md5($nl_name).'">Hier klicken zum freischalten</a><br /><br />Mit freundlichen Grüßen<br />Ihr Team<br />vom 
          </body>
        </html>'
    ;
        
    $mail->AltBody 'Guten Tag '.$nl_name.','."\n\n".'Sie haben sich auf unserer Internetseite f&uuml;r unseren kostenlosen Newsletter registriert. Zur Best&auml;tigung, dass es sich um die korrekte E-Mail Adresse handelt, klicken Sie bitte auf den folgenden Link, um den Newsletter zu erhalten:'."\n\n".''.$url_zu_basisordner.'index.php?spezial=newsletter3&id='.$insert_id.'&name='.md5($nl_name).''."\n\n".'Mit freundlichen Grüßen'."\n\n".'Ihr Team'."\n\n".'vom ';
        
        if(!
    $mail->Send()) {
            echo 
    '<span class="panik">Es gab einen Fehler, die Bestätigungsemail konnte nicht gesendet werden</span>:<br />';
            echo 
    $mail->ErrorInfo;
        }
        else {
            echo 
    'Vielen Dank '.$_POST['nl_name'].', dass Sie sich bei unserem Newsletter angemeldet haben. Bitte schauen Sie in Ihr Email Postfach und klicken Sie auf den Link in der Best&auml;tigungsemail.';
        } 

    Fehlermeldung mit MAX-DEGUg:

    Code:
    SMTP -&gt; get_lines(): $data was ""
    SMTP -&gt; get_lines(): $str is "220 smtp138.mail.ukl.yahoo.com ESMTP
    "
    SMTP -&gt; get_lines(): $data is "220 smtp138.mail.ukl.yahoo.com ESMTP
    "
    SMTP -&gt; FROM SERVER:
    220 smtp138.mail.ukl.yahoo.com ESMTP
    SMTP -&gt; get_lines(): $data was ""
    SMTP -&gt; get_lines(): $str is "250-smtp138.mail.ukl.yahoo.com
    "
    SMTP -&gt; get_lines(): $data is "250-smtp138.mail.ukl.yahoo.com
    "
    SMTP -&gt; get_lines(): $data was "250-smtp138.mail.ukl.yahoo.com
    "
    SMTP -&gt; get_lines(): $str is "250-AUTH LOGIN PLAIN XYMCOOKIE
    "
    SMTP -&gt; get_lines(): $data is "250-smtp138.mail.ukl.yahoo.com
    250-AUTH LOGIN PLAIN XYMCOOKIE
    "
    SMTP -&gt; get_lines(): $data was "250-smtp138.mail.ukl.yahoo.com
    250-AUTH LOGIN PLAIN XYMCOOKIE
    "
    SMTP -&gt; get_lines(): $str is "250-PIPELINING
    "
    SMTP -&gt; get_lines(): $data is "250-smtp138.mail.ukl.yahoo.com
    250-AUTH LOGIN PLAIN XYMCOOKIE
    250-PIPELINING
    "
    SMTP -&gt; get_lines(): $data was "250-smtp138.mail.ukl.yahoo.com
    250-AUTH LOGIN PLAIN XYMCOOKIE
    250-PIPELINING
    "
    SMTP -&gt; get_lines(): $str is "250 8BITMIME
    "
    SMTP -&gt; get_lines(): $data is "250-smtp138.mail.ukl.yahoo.com
    250-AUTH LOGIN PLAIN XYMCOOKIE
    250-PIPELINING
    250 8BITMIME
    "
    SMTP -&gt; FROM SERVER: 
    250-smtp138.mail.ukl.yahoo.com
    250-AUTH LOGIN PLAIN XYMCOOKIE
    250-PIPELINING
    250 8BITMIME
    SMTP -&gt; get_lines(): $data was ""
    SMTP -&gt; get_lines(): $str is "334 VXNlcm5hbWU6
    "
    SMTP -&gt; get_lines(): $data is "334 VXNlcm5hbWU6
    "
    SMTP -&gt; get_lines(): $data was ""
    SMTP -&gt; get_lines(): $str is "334 UGFzc3dvcmQ6
    "
    SMTP -&gt; get_lines(): $data is "334 UGFzc3dvcmQ6
    "
    SMTP -&gt; get_lines(): $data was ""
    SMTP -&gt; get_lines(): $str is "235 OK, go ahead
    "
    SMTP -&gt; get_lines(): $data is "235 OK, go ahead
    "
    SMTP -&gt; get_lines(): $data was ""
    SMTP -&gt; get_lines(): $str is "250 OK , completed
    "
    SMTP -&gt; get_lines(): $data is "250 OK , completed
    "
    SMTP -&gt; FROM SERVER:
    250 OK , completed
    SMTP -&gt; get_lines(): $data was ""
    SMTP -&gt; get_lines(): $str is "501 Syntax error in arguments
    "
    SMTP -&gt; get_lines(): $data is "501 Syntax error in arguments
    "
    SMTP -&gt; FROM SERVER:
    501 Syntax error in arguments
    SMTP -&gt; ERROR: RCPT not accepted from server: 501 Syntax error in arguments
    
    SMTP -&gt; get_lines(): $data was ""
    SMTP -&gt; get_lines(): $str is "250 flushed
    "
    SMTP -&gt; get_lines(): $data is "250 flushed
    "
    SMTP -&gt; FROM SERVER:
    250 flushed

Lädt...
X