Merge pull request #99 from stisa/patch-1

Fix compilation error: Move addr, port to connect in smtp
This commit is contained in:
Dominik Picheta 2017-04-21 20:27:00 +02:00 • committed by GitHub
commit ee7318966a

View file

@ -110,8 +110,8 @@ proc sendMail(config: Config, subject, message, recipient: string, from_addr = "
echo("[WARNING] Cannot send mail: no smtp server configured (smtpAddress).")
return
var client = newAsyncSmtp(config.smtpAddress, Port(config.smtpPort))
await client.connect()
var client = newAsyncSmtp()
await client.connect(config.smtpAddress, Port(config.smtpPort))
if config.smtpUser.len > 0:
await client.auth(config.smtpUser, config.smtpPassword)