Served moved to GoDaddy and PHP Mailer is giving an SMTP error - Hack The Tech - Latest News related to Computer and Technology

Hack The Tech - Latest News related to Computer and Technology

Get Daily Latest News related to Computer and Technology and hack the world.

Wednesday, August 9, 2023

Served moved to GoDaddy and PHP Mailer is giving an SMTP error

Our Media Temple server was bought and migrated to GoDaddy and now my PHP Mailer is not working. Not sure what needs to be updated - have looked around and only found threads which were several years old.

error is:

SMTP Error: Could not connect to SMTP host. Mailer Error (mail@domain.com) SMTP Error: Could not connect to SMTP host.SMTP server error: Called RSET without being connected

Code is:

$mail->SMTPDebug = SMTP::DEBUG_SERVER;
$mail->SMTPDebug = 4; 
$mail->isSMTP();
$mail->Host = 'domain.com.';
//$mail->Host = 'localhost';
$mail->SMTPAuth = true;
$mail->SMTPKeepAlive = true; //SMTP connection will not close after each email sent, reduces SMTP overhead
$mail->SMTPSecure = PHPMailer::ENCRYPTION_SMTPS;
$mail->Port = 465;
$mail->Username = 'user@domain.com';
$mail->Password = 'password';
$mail->setFrom('user@domain.com', 'user@domain.com');
$mail->addReplyTo('user@domain.com', 'user@domain.com');


source https://stackoverflow.com/questions/76862318/served-moved-to-godaddy-and-php-mailer-is-giving-an-smtp-error

No comments:

Post a Comment