Advertisement
Guest User

Untitled

a guest
Jul 13th, 2015
206
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. -- load the smtp support
  2. local smtp = require("socket.smtp")
  3.  
  4. from = "<luasocket@example.com>"
  5.  
  6. rcpt = {
  7. "<fulano@example.com>",
  8. "<beltrano@example.com>",
  9. "<sicrano@example.com>"
  10. }
  11.  
  12. mesgt = {
  13. headers = {
  14. to = "Fulano da Silva <fulano@example.com>",
  15. cc = '"Beltrano F. Nunes" <beltrano@example.com>',
  16. subject = "My first message"
  17. },
  18. body = "I hope this works. If it does, I can send you another 1000 copies."
  19. }
  20.  
  21. r, e = smtp.send{
  22. from = from,
  23. rcpt = rcpt,
  24. source = smtp.message(mesgt)
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement