PHPMailer Problem
Ich nutzte PHPMailer in meiner App und habe bis her auch keine Probleme aber seit 6 Tagen habe ich ein Problem.
Wenn ich die App versucht die Mails zu schicken kann sie keine Verbindung zum SMTP Server aufbauen und gibt folgende Fehler Meldung aus.
SMTP Error: Could not connect to SMTP host
Ich habe keine Änderungen gemacht und was mich wundert ist, dass eine andere App auf dem lokalen Rechner (xammp) mit den gleichen Einstellung richtig funktioniert.
Meine App läuft auf IIS7
Hier eine Teil meines Codes:
woran kann es liegen?
Danke
SMTP Error: Could not connect to SMTP host
Ich habe keine Änderungen gemacht und was mich wundert ist, dass eine andere App auf dem lokalen Rechner (xammp) mit den gleichen Einstellung richtig funktioniert.
Meine App läuft auf IIS7
Hier eine Teil meines Codes:
// send mail
$PHPMailer = new PHPMailer();
$To =$ns_email;// ns_mail is exp. blabla@bala.com
$To ="support@mydomain.org";//
$From ="system@mydomain.com";//
$FromName ="sender";//
$Subject ="test";//
$Message ="test message";//
$PHPMailer->IsSMTP(True);// SMTP
$PHPMailer->Host = 'smtp.mydomain.com';// SMTP
$PHPMailer->isHtml(True);//True or false
$PHPMailer->AddAddress($ns_email);
$PHPMailer->Port = '25';//
$PHPMailer->SMTPAuth = true;//
$PHPMailer->Username = 'system@mydomain.com';//
$PHPMailer->Password = '******';//
$PHPMailer->CharSet = "UTF-8";//
$PHPMailer->From = $From;//
$PHPMailer->FromName = $FromName;//
$PHPMailer->AddAddress($To);//
$PHPMailer->Subject = $Subject;//
$PHPMailer->Body = $Message;//
if($PHPMailer->Send())
{
echo '<div class="succes">';
print('good.');
echo '</div>';
}
else
{
echo "Error: " . $PHPMailer->ErrorInfo;
}
//end send mail
woran kann es liegen?
Danke
Please also mark the comments that contributed to the solution of the article
Content-Key: 169317
Url: https://administrator.de/contentid/169317
Printed on: April 18, 2024 at 10:04 o'clock
1 Comment