Sending notificaiton emails using SSL/TLS

I’ve tried to set Duplicati up to send notification emails on completion through my SMTP server (, but I’m getting errors:
1.System.ObjectDisposedException: Cannot write to a closed TextWriter. at System.IO.StreamWriter.Flush (Boolean flushStream, Boolean flushEncoder) <0x420562d0 + 0x0004f> in <filename unknown>:0 at System.IO.StreamWriter.Flush () <0x42102a50 + 0x00031> in <filename unknown>:0 at Duplicati.Server.WebServer.RESTHandler.DoProcess (Duplicati.Server.WebServer.RESTMethods.RequestInfo info, System.String method, System.String module, System.String key) <0x42222f80 + 0x018a2> in <filename unknown>:0

  1. System.Net.WebException: Server returned an error: 530 Login incorrect. at Duplicati.Library.Utility.AsyncHttpRequest+AsyncWrapper.GetResponseOrStream () <0x421d3270 + 0x0010b> in <filename unknown>:0 at Duplicati.Library.Utility.AsyncHttpRequest.GetResponse () <0x421cda30 + 0x0016b> in <filename unknown>:0 at Duplicati.Library.Backend.FTP.List (System.String filename) <0x42359000 + 0x00167> in <filename unknown>:0

The email script in Duplicati is:
–send-mail-subject=Duplicati Backup %PARSEDRESULT%, %OPERATIONNAME% report for %backup-name%
–send-mail-from=DEEP-THOUGHT backup %MYUSERNAME%

I’ve tried it with and without the port number.

The SMTP settings that work fine (in Thunderbird) are
Port: 465
Username: %MYUSERNAME%
Password: %MYPASSWORD%
Authentication method: Normal password
Connection security: SSL/TLS

Can anyone suggest what’s going wrong?

The second error of “530 Login incorrect” seems to indicate either the --send-mail-username or --send-mail-password is incorrect. Is it possible the username or password have “strange” characters (such as quotes) that might cause the email call to be parsed in correctly?

You might want to try running it AS a command line (actual command line, not the GUI option) with the --verbose=true parameter added as that will include a summary of the “Input options” which might help identify an incorrectly parsed parameter.

Here’s what my results with that call kind of looks like:

Input command: send-mail
Input arguments:

Input options:
verbose: true
send-mail-any-operation: true
send-mail-url: smtp://
send-mail-subject: Duplicati %OPERATIONNAME% (%PARSEDRESULT%) report for %backup-name%
backup-name: TestBackup
dbpath: C:\Users\Me\AppData\Local\Duplicati\BWHZSFAZZY.sqlite