Configure email transport for Kimai

Kimai uses the Symfony Mailer component for sending emails. Please read their documentation to find out more about possible connection details.

Activating email

You have to adapt two settings in your .env configuration file:

  • MAILER_URL - the connection details for sending emails
  • MAILER_FROM - an application wide “from” address for all emails


These are some examples to configure your SMTP for sending emails:

  • Deactivated: null://null
  • SMTP: smtp://localhost:25
  • Sendmail: sendmail://default
  • Gmail: smtps://{username}:{password}
  • Brevo: smtps://{username}:{password}
  • Sendgrid: smtps://{username}:{password}

More explanation can be found int the Symfony mailer documentation.

Some more complex examples for the default SMTP transport:

  • SMTP with authentication: smtp://
  • With email as username: smtp://
  • With TLS/SSL encryption: smtp://


You can test your email configuration by registering a new account or using the password reset function.

During your initial tests, you might try to use the password reset function over and over again. That will not work, as Kimai stores a timestamp when the last password reset was requested and does not allow another request in a certain timespan.

To work around that waiting time, you can reset the timer by issuing the following command (replace the username with yours):

bin/console doctrine:query:dql "UPDATE App\Entity\User u SET u.passwordRequestedAt = null WHERE u.username = 'anna_admin'"

Error 500 when sending emails

Some commonly used password characters can cause problems, which lead to a 500 error when trying to send an email. Those could be for example: @, +, : or # - but other ones might be affected as well!

You need to encode them, so they can be safely used in the connection URL. This can be done with one PHP command, assuming your password is mG0/d1@3aT#Z+s1 then execute:

php -r "echo urlencode('mG0/d1@3aT#Z+s1');"

Your MAILER_URL would look like this:


SMTP does not accept emails

If you have the following error in your logfile:

app.ERROR: Exception occurred while flushing email queue: Expected response code 354 but got code "503", with message "503-All RCPT commands were rejected with this error: 503-R1: HELO should be a FQDN or address literal (See RFC 2821 503 Valid RCPT command must precede DATA " [] []

you might suffer from a wrong configuration (read the documentation linked above) and try a fully featured SMTP URL with a dedicated user account for authentication:


Password should not contain URL characters like ‘&@:’, which can cause problems parsing the SMTP URL (see above).