startTls should be after connection of course
This commit is contained in:
parent
3b6e7363a9
commit
6c6ed08ec9
1 changed files with 1 additions and 1 deletions
|
|
@ -45,9 +45,9 @@ proc sendMail(
|
||||||
return
|
return
|
||||||
|
|
||||||
var client = newAsyncSmtp()
|
var client = newAsyncSmtp()
|
||||||
|
await client.connect(mailer.config.smtpAddress, Port(mailer.config.smtpPort))
|
||||||
if mailer.config.smtpTls:
|
if mailer.config.smtpTls:
|
||||||
await client.startTls()
|
await client.startTls()
|
||||||
await client.connect(mailer.config.smtpAddress, Port(mailer.config.smtpPort))
|
|
||||||
if mailer.config.smtpUser.len > 0:
|
if mailer.config.smtpUser.len > 0:
|
||||||
await client.auth(mailer.config.smtpUser, mailer.config.smtpPassword)
|
await client.auth(mailer.config.smtpUser, mailer.config.smtpPassword)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue