Send email by office 365


#1

Hello, I have an issue with matomo when I try to send reports with email by office 365 email account. It works for gmail but not for office 365. On same server I use PHPmailer with the same configuration and it works well. So the issue is only with matomo. Please find below details for the error reported. Your help is appreciated.

(email account is different in the original error)

An error occurred while sending ‘HTML Email Report - 3.yesterday.1.en - noR6TXG1pN1LTbjhTFAE47an68Jtx7LY5tOvplQT.html’ to user.name@companydomainname.com. Error was ‘5.2.0 STOREDRV.Submission.Exception:SendAsDeniedException.MapiExceptionSendAsDenied; Failed to process message due to a permanent exception with message Cannot submit message. 16.55847:B0130000, 17.43559:0000000004020000000000000000000000000000, 20.52176:140F1587000010100A00FB7F, 20.50032:140F1587701710100A00FC7F, 0.35180:84180000, 255.23226:0A001137, 255.27962:0A000000, 255.27962:0E000000, 255.31418:0A000000, 16.55847:C4000000, 17.43559:00000000E0020000000000000100000000000000, 20.52176:140F15870000101003000136, 20.50032:140F1587701710100A00DA36, 0.35180:44000000, 255.23226:4800D13D, 255.27962:0A000000, 255.27962:32000000, 255.17082:DC040000, 0.27745:0A003A66, 4.21921:DC040000, 255.27962:FA000000, 255.1494:64000000, 0.38698:0F010480, 0.37692:1A010480, 0.37948:00400600, 5.33852:00000000534D545000010480, 4.56248:DC040000, 7.40748:010000000000010B30303A4D, 7.57132:00000000000000003A306535, 1.63016:32000000, 4.39640:DC040000, 8.45434:D7528821DBA69C4383A63437D4727ED500000000, 5.10786:0000000031352E32302E3138’

Emal setings as below:
smtp.office365.com
587
Login
user.name@companydomainname.com
TLS


(Lukas Winkler) #2

Hi,

I looked for the (really vague) error message and it seems like there is a logical reason for this error:

Your mailserver doesn’t allow you to send E-Mails from the From: adress Matomo is trying to use.

So you should set the following in the [General] section of your config.ini.php:

login_password_recovery_email_address = "matomo@example.com"
noreply_email_address = "matomo@example.com"

with the E-Mail sender you are allowed to use.
https://matomo.org/faq/how-to/faq_18336/
https://matomo.org/faq/how-to/faq_109/


#3

Thank you Lukas. It solved the issue. Thank you for quick reply.