Error: address in mailbox given [username] does not comply with RFC 2822, 3.6.2

I got this on my self-hosted Ubuntu 15.04:

Address in mailbox given [username] does not comply with RFC 2822, 3.6.2.

I managed to solve it by editing my .env file, which I have located here:

/var/www/ninja/.env

For my SMTP settings, I had entered just my username for MAIL_USERNAME, which does suffice for my ISP but it seems that Invoice Ninja requires the first email address for the username.

Instead of:
MAIL_USERNAME=john_doe

it requires:
[email protected]

I hope this helps someone.