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

Send mail uses password-reset as user instead of assigned user in config #16825

Closed
igm-jl opened this issue Nov 27, 2020 · 1 comment
Closed
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@igm-jl
Copy link

igm-jl commented Nov 27, 2020

I have set all my credentials and mail user to the no-reply@. but in the logs it keeps wanting to use password-reset@. (after enabling mailer debug and reading the issues returned).

Office365 (or at least my configuration of) blocks you from sending emails from a different user account so because Matomo is trying to force sending it as password-reset instead of the actual user I put into the config, the authentication fails.

I was able to get the mailer to work by adding $phpMailer->setFrom() to the actual email address that needed to be authenticated against in /core/Mail/Transport.php' prior to return $phpMailer->send().

It might make sense to either only use the actual authentication email address (as one would expect the default behaviour would be) OR to provide an option to override this in the settings page.

@sgiehl
Copy link
Member

sgiehl commented Nov 27, 2020

@igm-jl you can set this config values to adjust the email address password requests are sent from:

; email address that appears as a Sender in the password recovery email
; if specified, {DOMAIN} will be replaced by the current Matomo domain
login_password_recovery_email_address = "password-recovery@{DOMAIN}"
; name that appears as a Sender in the password recovery email
login_password_recovery_email_name = Matomo
; email address that appears as a Reply-to in the password recovery email
; if specified, {DOMAIN} will be replaced by the current Matomo domain
login_password_recovery_replyto_email_address = "no-reply@{DOMAIN}"
; name that appears as a Reply-to in the password recovery email
login_password_recovery_replyto_email_name = "No-reply"

@sgiehl sgiehl closed this as completed Nov 27, 2020
@sgiehl sgiehl added the answered For when a question was asked and we referred to forum or answered it. label Nov 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

2 participants