Anonymous user
Send email: Difference between revisions
Updated for Nim 1.4: taken in account the interface changes in "smtp" module.
m (→{{header|Phix}}: added libheader) |
(Updated for Nim 1.4: taken in account the interface changes in "smtp" module.) |
||
Line 1,133:
=={{header|Nim}}==
Compile with <code>nim c -d:ssl mail</code>
<lang nim>import smtp
proc sendMail(fromAddr: string; toAddrs, ccAddrs: seq[string];
subject, message, login, password: string;
server = "smtp.gmail.com"; port = Port 465; ssl = true) =
session.connect(server, port)
sendMail(fromAddr = "nim@gmail.com",
|