E-mail Notifications not Recieved

Hi,

In Settings/Default options I have the following e-mail settings:

--send-mail-from=xxxx@yyyy.com
–send-mail-url=smtps://smtp.gmail.com:465
--send-mail-username=aaaa@bbbb.com
–send-mail-password=xxxxxxxxxxxxxx
–send-mail-any-operation=true
–send-mail-level=All

I am running Duplicati in a Linux Docker container and I can confirm my e-mail settings by executing this:

mono Duplicati.CommandLine.exe send-mail --send-mail-to=aaaa@bbbb.com

…which gives me the result:

Email sent successfully using server: smtp://alt1.aspmx.l.google.com

…and I also do get a test e-mail sent to the expected inbox. However, I do not receive any e-mails after my backups complete.

I don’t see anything in the logs to do with e-mails either (but I am not sure what I would be looking for).Can anyone suggest ways in which I could problem solve this?

Maybe I am missing something but in my Settings/Default I also have this setting.

send-mail-to xxxx@xxxxxxxxx.org

The full text printout:
--send-mail-from=xxxx@xxxxxxxxx.org
–send-mail-password=xxxxxxx
--send-mail-to=xxxxxx@xxxxxxx.org
--send-mail-username=xxxxx@xxxxxxxx.org
–send-mail-url=smtps://mail.xxxxxxxx:465
–send-mail-log-level=Error

Those are for the web UI process. Duplicati.CommandLine.exe doesn’t use those settings and operates completely independently from the web UI configurations.

In the settings you show for the web UI, you are missing the --send-mail-to option. Maybe you have it configured at the job level?

Beyond that, Gmail is probably pretty restrictive. I’m guessing you must use the same email address in --send-mail-from as you use for authentication with --send-mail-username. For the password you probably should use an App Password but maybe it’s not necessary.

Also, in another thread I saw someone was using --send-mail-url=smtps://smtp.gmail.com:587/?starttls=always so you might want to give that a shot.

Try setting --send-mail-log-level=all while troubleshooting. Do you get any sort of error message when the email notification attempt is made?

Less secure apps & your Google Account might be relevant, but beware of below
Gmail automatically disables “Access for less secure apps” after inactivity period

Email works OK for me.
I was just trying to help and pointing out that the OP might need a “send-mail-to” line. He shows it in his command line example but not in the Default/Settings list. Or can you guys get the email without having the “send-mail-to” line filled in?

From testing with my ISP, this results in no email sent, so it’s likely a good clue.
Thanks for noting it. It might not be the only issue with the original setup though.

Thanks for all your comments, I did indeed neglect to include the send-mail-to setting which I have now added. I now get an actual error message:

MailKit.Security.AuthenticationException: 535: 5.7.8 Username and Password not accepted.

I am using an app password, but at least I now have some feedback and I can investigate the cause - some good ideas given, thanks!

1 Like

Just in case it helps, I use Mailjet as an SMTP relay for the email notifications. It is GDPR compliant and an excellent service with a free plan.

1 Like

My final issue was simply a typo in my app password. All is working fine now using Gmail. Thanks for the help everyone!

2 Likes