maik: PHPMailer_v5.1 warum krieg ish das nicht zum laufen?

Beitrag lesen

Hallo,

ich nehm einfach die Besipieldatei test_smtp_basic.php. dem dem Paket beiliegt.
Trage meine Daten ein und kriege immer die Meldung:

SMTP -> ERROR: Failed to connect to server: Operation timed out (60)
SMTP Error: Could not connect to SMTP host. Mailer Error: SMTP Error: Could not connect to SMTP host.

Ich hab bestimmt schon 100 mal den Server gecheckt, stimmt alles.
Hier der Code:

<html>
<head>
<title>PHPMailer - SMTP advanced test with authentication</title>
</head>
<body>

<?php

require_once('../class.phpmailer.php');
//include("class.smtp.php"); // optional, gets called from within class.phpmailer.php if not already loaded

$mail = new PHPMailer(true); // the true param means it will throw exceptions on errors, which we need to catch

$mail->IsSMTP(); // telling the class to use SMTP

try {
  $mail->Host       = "smtp.1und1.de"; // SMTP server
  $mail->SMTPDebug  = 2;                     // enables SMTP debug information (for testing)
  $mail->SMTPAuth   = true;                  // enable SMTP authentication
  $mail->Host       = "smtp.1un1d.de"; // sets the SMTP server
  $mail->Port       = 26;                    // set the SMTP port for the GMAIL server
  $mail->Username   = "meiner@meiner.de"; // SMTP account username
  $mail->Password   = "meinpasswort";        // SMTP account password
  $mail->AddReplyTo('meiner@meiner.de', 'First Last');
  $mail->AddAddress('andere@meiner.de', 'John Doe');
  $mail->SetFrom('meiner@meiner.de', 'First Last');
  $mail->AddReplyTo('meiner@meiner.de', 'First Last');
  $mail->Subject = 'PHPMailer Test Subject via mail(), advanced';
  $mail->AltBody = 'To view the message, please use an HTML compatible email viewer!'; // optional - MsgHTML will create an alternate automatically
  $mail->MsgHTML(file_get_contents('contents.html'));
  $mail->AddAttachment('images/phpmailer.gif');      // attachment
  $mail->AddAttachment('images/phpmailer_mini.gif'); // attachment
  $mail->Send();

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

</body>
</html>

Wieso findet der den Server nicht?
Ich krieg die Krise. :(

Vielen Dank schomma.