Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PHPMailer Connection to the SMTP server failed when resetting password in 4.0.5 #17057

Closed
Starker3 opened this issue Jan 7, 2021 · 2 comments
Labels
duplicate For issues that already existed in our issue tracker and were reported previously.

Comments

@Starker3
Copy link
Contributor

Starker3 commented Jan 7, 2021

We received the following report:

Matomo 4.0.5: When i change my password i'll get an error page:

Verbindung zum SMTP-Server fehlgeschlagen. https://github.com/PHPMailer/PHPMailer/wiki/Troubleshooting

Translation: Connection to the SMTP server failed

The password is changed successfully, but the error still occurs

A test using:
./console core:test-email test@example.com
has been successful.

It is not appear to be a problem with PHP mailer.

On their system 6.1.8 is installed and the following test worked fine:

<?php
use PHPMailer\PHPMailer\PHPMailer;
use PHPMailer\PHPMailer\SMTP;
date_default_timezone_set('Etc/UTC');
require '../autoload.php';
$mail = new PHPMailer();
$mail->isSMTP();
$mail->SMTPDebug = SMTP::DEBUG_SERVER;
$mail->Host = 'localhost';
$mail->Port = 25;
$mail->setFrom('test@example.com', 'Matomo');
$mail->addReplyTo('test@example.com', 'Matomo');
$mail->addAddress('test@example.com', 'Uwe Wenglewski');
$mail->Subject = 'PHPMailer SMTP without auth test';
$mail->msgHTML("Hallo");
$mail->AltBody = 'This is a plain-text message body';
if (!$mail->send()) {
echo 'Mailer Error: ' . $mail->ErrorInfo;
} else {
echo 'Message sent!';
}
@Starker3
Copy link
Contributor Author

Starker3 commented Jan 8, 2021

Additional note after further feedback from user:
They received the email notifying them of a new update available.

So it seems the PHPMailer is only failing to send the password reset emails.

@tsteur
Copy link
Member

tsteur commented Jan 10, 2021

@Starker3 I'll close this for now as a duplicate of #17026

Maybe they can set login_password_recovery_email_address and login_password_recovery_replyto_email_address to noreply@{DOMAIN} (same config value as noreply_email_address) and see if it works then.

@tsteur tsteur closed this as completed Jan 10, 2021
@tsteur tsteur added the duplicate For issues that already existed in our issue tracker and were reported previously. label Jan 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate For issues that already existed in our issue tracker and were reported previously.
Projects
None yet
Development

No branches or pull requests

2 participants