I’m trying to set up email notifications, but for some reason unknown to me I’m failing. This are my settings (anonymized, don’t worry), I extracted all data from my Outlook settings:
–send-mail-from=name@domain.es
–send-mail-url=smtp://smtp.domain.es:465
–send-mail-password=MyP4ssw0rd
–send-mail-subject=%PARSEDRESULT%: Duplicati %OPERATIONNAME% report for %backup-name%
–send-mail-level=Success,Warning,Error,Fatal
–send-mail-to=name@domain.es
–send-mail-body=%RESULT%
You can see this is the exact same settings Outlook has configured (changed domain, adress and password for the screenshot, don’t worry about it):
However when a backup is run, I get a warning message: 2021-11-05 10:47:52 +01 - [Warning-Duplicati.Library.Modules.Builtin.ReportHelper-ReportSubmitError]: Failed to send message: MailKit.Net.Smtp.SmtpProtocolException: The SMTP server has unexpectedly disconnected.
I’ve checked and this happens everytime, however I can send emails without any problem from Outlook, What am I missing here?
Not all mail services allow you to submit mail via SMTP. Does your mailbox.org account allow regular client applications (like Outlook, Thunderbird, etc) to send mail via SMTP? If they do, they almost certainly require authentication. Make sure you set up Duplicati the same way as your email client application.
Are you sure your syntax for SMTP server is correct? If I read the help, it is specified : “To enable SMTP over SSL, use the format smtps://example.com.”
Thus I would rather try something like –send-mail-url=smtps://smtp.domain.es
please configure your mailbox using the following settings:
Always enter your full e-mail address (jane.doe@mailbox.org) when logging in on our site.
Password: Your password
Port 465 is never anything but SSL/TLS, so getting the error back says that it got connected:
If you want to see log of the client and server SMTP interaction, log at profiling level has it.
Be careful of what you post (or better yet, don’t quote). You might post something sensitive…
Rather than hang around in About → Show log → Live → Profiling for an actual backup email (or setting send-mail-any-operation so other operations send email), above was from Commandline with Command changed to send-mail, Target URL box cleared, and Commandline arguments set to show profiling log:
--console-log-level=profiling
Rest of the usual backup stuff was lazily left and drew some complaints. This was just a way to send an email without having to set up everything again, and it was enough to show what client and server said…