mirror of
https://github.com/lunarmodules/luasocket.git
synced 2024-11-08 06:18:21 +01:00
doesn't fail on windows.
This commit is contained in:
parent
8841e0f3c1
commit
e70d404a10
@ -1,3 +1,6 @@
|
||||
require("smtp")
|
||||
require("mime")
|
||||
|
||||
mesgt = {
|
||||
headers = {
|
||||
to = "D Burgess <db@werx4.com>",
|
||||
@ -10,12 +13,12 @@ mesgt = {
|
||||
},
|
||||
[2] = {
|
||||
headers = {
|
||||
["content-type"] = 'application/octet-stream; name="luasocket"',
|
||||
["content-disposition"] = 'attachment; filename="luasocket"',
|
||||
["content-type"] = 'application/octet-stream; name="testmesg.lua"',
|
||||
["content-disposition"] = 'attachment; filename="testmesg.lua"',
|
||||
["content-transfer-encoding"] = "BASE64"
|
||||
},
|
||||
body = ltn12.source.chain(
|
||||
ltn12.source.file(io.open("luasocket", "rb")),
|
||||
ltn12.source.file(io.open("testmesg.lua", "rb")),
|
||||
ltn12.filter.chain(
|
||||
mime.encode("base64"),
|
||||
mime.wrap()
|
||||
@ -41,10 +44,6 @@ mesgt = {
|
||||
}
|
||||
}
|
||||
|
||||
-- sink = ltn12.sink.file(io.stdout)
|
||||
-- source = ltn12.source.chain(socket.smtp.message(mesgt), socket.smtp.stuff())
|
||||
-- ltn12.pump.all(source, sink)
|
||||
|
||||
print(socket.smtp.send {
|
||||
rcpt = "<diego@cs.princeton.edu>",
|
||||
from = "<diego@cs.princeton.edu>",
|
||||
|
Loading…
Reference in New Issue
Block a user