Ungültige Adresse in PHPMailerPhp

PHP-Programmierer chatten hier
Anonymous
 Ungültige Adresse in PHPMailer

Post by Anonymous »

Ich erhalte eine Fehlermeldung über eine ungültige Adresse, während ich das folgende PHP-Skript ausführe. Die SMTP-Anmeldeinformationen und die E-Mail-Adresse des Empfängers wurden für diesen Beitrag geändert. Sie gelten alle für das eigentliche Skript. Ich weiß nicht, warum die Empfänger-E-Mail abgelehnt wird. Ich versuche, eine E-Mail mit SMTP-Authentifizierung zu senden, und SMTP-Sicherheit (SSL, TLS) ist nicht erforderlich.

Jede Hilfe wäre dankbar.

Code: Select all

include 'PHPMailer_5.2.2/class.phpmailer.php';

function SendConfirmation ($sName, $sEmail)
{
$mail = new PHPMailer ();

$mail->SMTPDebug  = 2;

$mail->Host = "mail.exchange.telus.com";
$mail->IsSMTP ();
$mail->Username = "[email protected]";
$mail->Password = "password";

$mail->From = "[email protected]";
$mail->FromName = "Web Site";

$mail->AddAddress ($sEmail, $sName);

$mail->Subject = 'PHPMailer Test' . date ('Y-m-d H:i:s');
$mail->Body = "This is a test.";

if ($mail->Send ())
echo "\r\nMail sent.";
else
echo "\r\nMail not sent. " .  $mail->ErrorInfo;

echo "\r\n";
}

/***[ Main ] **************************************************************************/

$sName = 'Johan Cyprich';
$sEmail = '[email protected]';

$bSent = SendConfirmation ($sName, $sEmail);

Quick Reply

Change Text Case: 
   
  • Similar Topics
    Replies
    Views
    Last post