You can configure Matomo to use your SMTP server as the mailserver (instead of using the default mailserver that PHP is configured to use).

To configure a SMTP server for Matomo, login as Super User, go to Administration > General Settings. Under ‘Email server settings’ you may configure the SMTP server form as follows:

  • Use SMTP server for e-mail. For Gmail SMTP use YES
  • SMTP server address. For Gmail SMTP use smtp.gmail.com
  • SMTP Port. For Gmail SMTP use 465
  • Authentication method for SMTP. For Gmail SMTP use Login
  • SMTP username. For Gmail SMTP use your gmail username
  • SMTP password. For Gmail SMTP use your gmail password
  • SMTP encryption. For Gmail SMTP use SSL

Also you may need to go in to Gmail and enable the option “Allow Less Secure Apps” here. Stay assured Matomo is still secure.

If you have enabled 2 step verification (2FA/MFA) with Gmail, you will need to set up a password in Gmail specifically for use in Matomo. It’s done in the “App passwords” section of your Gmail account. Then enter this generated “App password” in Matomo > Settings > Email server settings > SMTP password.

All Matomo emails (Scheduled PDF Reports, Password reset confirmation, etc.) will now be sent using Gmail servers.