Merge pull request #99 from stisa/patch-1
Fix compilation error: Move addr, port to connect in smtp
This commit is contained in:
commit
ee7318966a
1 changed files with 2 additions and 2 deletions
|
|
@ -110,8 +110,8 @@ proc sendMail(config: Config, subject, message, recipient: string, from_addr = "
|
||||||
echo("[WARNING] Cannot send mail: no smtp server configured (smtpAddress).")
|
echo("[WARNING] Cannot send mail: no smtp server configured (smtpAddress).")
|
||||||
return
|
return
|
||||||
|
|
||||||
var client = newAsyncSmtp(config.smtpAddress, Port(config.smtpPort))
|
var client = newAsyncSmtp()
|
||||||
await client.connect()
|
await client.connect(config.smtpAddress, Port(config.smtpPort))
|
||||||
if config.smtpUser.len > 0:
|
if config.smtpUser.len > 0:
|
||||||
await client.auth(config.smtpUser, config.smtpPassword)
|
await client.auth(config.smtpUser, config.smtpPassword)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue