Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- load the smtp support
- local smtp = require("socket.smtp")
- from = "<luasocket@example.com>"
- rcpt = {
- "<fulano@example.com>",
- "<beltrano@example.com>",
- "<sicrano@example.com>"
- }
- mesgt = {
- headers = {
- to = "Fulano da Silva <fulano@example.com>",
- cc = '"Beltrano F. Nunes" <beltrano@example.com>',
- subject = "My first message"
- },
- body = "I hope this works. If it does, I can send you another 1000 copies."
- }
- r, e = smtp.send{
- from = from,
- rcpt = rcpt,
- source = smtp.message(mesgt)
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement