Updates for 2.0.1 on the way.
This commit is contained in:
parent
09ad4b299c
commit
93806208c7
6 changed files with 26 additions and 62 deletions
|
@ -1,3 +1,5 @@
|
|||
local dict = require"socket.dict"
|
||||
|
||||
print(dict.get("dict://localhost/d:teste"))
|
||||
|
||||
for i,v in pairs(dict.get("dict://localhost/d:teste")) do print(v) end
|
||||
|
|
|
@ -32,13 +32,6 @@ r, e = smtp.send{
|
|||
port = 2525
|
||||
}
|
||||
|
||||
|
||||
os.exit()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
-- creates a source to send a message with two parts. The first part is
|
||||
-- plain text, the second part is a PNG image, encoded as base64.
|
||||
source = smtp.message{
|
||||
|
@ -67,13 +60,13 @@ source = smtp.message{
|
|||
-- chunks are loaded into memory and translation happens on the fly.
|
||||
[2] = {
|
||||
headers = {
|
||||
["content-type"] = 'image/png; name="image.png"',
|
||||
["content-disposition"] = 'attachment; filename="image.png"',
|
||||
["content-type"] = 'image/png; name="luasocket.png"',
|
||||
["content-disposition"] = 'attachment; filename="luasocket.png"',
|
||||
["content-description"] = 'a beautiful image',
|
||||
["content-transfer-encoding"] = "BASE64"
|
||||
},
|
||||
body = ltn12.source.chain(
|
||||
ltn12.source.file(io.open("image.png", "rb")),
|
||||
ltn12.source.file(io.open("luasocket.png", "rb")),
|
||||
ltn12.filter.chain(
|
||||
mime.encode("base64"),
|
||||
mime.wrap()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue