SMTP
Send emails via SMTP protocol using raw TCP sockets (RFC 5321).
Install
bash
wyn pkg install github.com/wynlang/smtpUsage
wyn
var ok = Smtp.send(
"smtp.example.com", // host
25, // port
"from@example.com", // from
"to@example.com", // to
"Hello", // subject
"Message body" // body
)
if ok {
println("Email sent")
}API
| Method | Description |
|---|---|
Smtp.send(host, port, from, to, subject, body) -> bool | Send email via SMTP |
Supports plain SMTP (port 25/587). For TLS/STARTTLS, use a relay that supports unencrypted connections.