phpmailer - live.com und error:Language string failed to load: tls

Hallo, ich möchte Mails verschicken mit hotmail-Konto und ich bekomme:

SMTP -> FROM SERVER:220 mx.google.com ESMTP q44sm31046347eep.5
SMTP -> FROM SERVER: 250-mx.google.com at your service, [91.203.134.106] 250-SIZE     35882577 250-8BITMIME 250-AUTH LOGIN PLAIN XOAUTH XOAUTH2 250-ENHANCEDSTATUSCODES 250     PIPELINING
SMTP -> FROM SERVER:502 5.5.1 Unrecognized command. q44sm31046347eep.5
SMTP -> ERROR: STARTTLS not accepted from server: 502 5.5.1 Unrecognized command.    q44sm31046347eep.5
SMTP -> FROM SERVER:250 2.1.5 Flushed q44sm31046347eep.5
Language string failed to load: tls 

Ich weiß nicht, warum es ist mx.google.com an alle!!!
Hier ist mein code

require_once('phpmailer/class.phpmailer.php');
    $defport=25;
    $sendmail='[email protected]';
    $mailpass='PASS';


    $mail = new PHPMailer(true);
    try {
    $mail->IsSMTP(); //send via SMTP
$mail->Mailer = "smtp";
if($defport==25) $mail->SMTPSecure   = "tls";
    $mail->SMTPAuth = true; //turn on SMTP authentication
$mail->SMTPDebug = 2;
$mail->Host = 'smtp.live.com';
    $mail->Port  = 25;
    $mail->Username = $sendmail; //SMTP username
    $mail->Password = $mailpass; //SMTP password
    $mail->From = $sendmail;
$mail->FromName = $sendmail;
    $mail->Subject = 'test';
    $mail->Body = 'test';
$mail->WordWrap = 50;
    $mail->AddAddress ('[email protected]');
$mail->IsHTML (true);
    $mail->SetLanguage("en", "phpmailer/language/");

    $mail->CharSet = 'utf-8';

   $mail->Send();
 echo "Message Sent OK\n";
} catch (phpmailerException $e) {
  echo $e->errorMessage(); //Pretty error messages from PHPMailer
} catch (Exception $e) {
  echo $e->getMessage(); //Boring error messages from anything else!
}
?>

Wissen Sie, dass kann falsch sein?

Habe ich versucht eine andere version von phpmailer (5.2.2) und erhielt folgenden Fehler:

Warning: preg_match() [function.preg-match]: Compilation failed: reference to non-existent subpattern at offset 626 in ***/phpmailer/class.phpmailer.php on line 738
Invalid address: foo@foobar.bar.com

die Linie 738 wird:

    return preg_match('/^(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){255,})(?!(?>(?1)"?(?>\\\[ -~]|[^"])"?(?1)){65,}@)((?>(?>(?>((?>(?>(?>\x0D\x0A)?[   ])+|(?>[    ]*\x0D\x0A)?[   ]+)?)(\((?>(?2)(?>[\x01-\x08\x0B\x0C\x0E-\'*-\[\]-\x7F]|\\\[\x00-\x7F]|(?3)))*(?2)\)))+(?2))|(?2))?)([!#-\'*+\/-9=?^-~-]+|"(?>(?2)(?>[\x01-\x08\x0B\x0C\x0E-!#-\[\]-\x7F]|\\\[\x00-\x7F]))*(?2)")(?>(?1)\.(?1)(?4))*(?1)@(?!(?1)[a-z0-9-]{64,})(?1)(?>([a-z0-9](?>[a-z0-9-]*[a-z0-9])?)(?>(?1)\.(?!(?1)[a-z0-9-]{64,})(?1)(?5)){0,126}|\[(?:(?>IPv6:(?>([a-f0-9]{1,4})(?>:(?6)){7}|(?!(?:.*[a-f0-9][:\]]){7,})((?6)(?>:(?6)){0,5})?::(?7)?))|(?>(?>IPv6:(?>(?6)(?>:(?6)){5}:|(?!(?:.*[a-f0-9]:){5,})(?8)?::(?>((?6)(?>:(?6)){0,3}):)?))?(25[0-5]|2[0-4][0-9]|1[0-9]{2}|[1-9]?[0-9])(?>\.(?9)){3}))\])(?1)$/isD', $address);

Hoffe, dass jemand es herausfinden wird,

  • Sie benötigen TLS? Wenn nicht, entfernen Sie einfach if($defport==25) $mail->SMTPSecure = "tls";
  • hotmail benötigt - versucht ohne und bekam: SMTP Error: Could not authenticate.
InformationsquelleAutor andrewpo | 2012-12-17
Schreibe einen Kommentar