diff options
author | Diego Nehab <diego@tecgraf.puc-rio.br> | 2006-03-19 21:22:21 +0000 |
---|---|---|
committer | Diego Nehab <diego@tecgraf.puc-rio.br> | 2006-03-19 21:22:21 +0000 |
commit | 93806208c77607146f6f462426e380e732327ed5 (patch) | |
tree | ac0286d21b5d9343ab01afda6bc277e152936065 /test/testmesg.lua | |
parent | 09ad4b299c59c3c5c6c442f0ee99f3c9e8dbe8ce (diff) | |
download | luasocket-93806208c77607146f6f462426e380e732327ed5.tar.gz luasocket-93806208c77607146f6f462426e380e732327ed5.tar.bz2 luasocket-93806208c77607146f6f462426e380e732327ed5.zip |
Updates for 2.0.1 on the way.
Diffstat (limited to 'test/testmesg.lua')
-rw-r--r-- | test/testmesg.lua | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/test/testmesg.lua b/test/testmesg.lua index 1dd9a97..5bec026 100644 --- a/test/testmesg.lua +++ b/test/testmesg.lua | |||
@@ -32,13 +32,6 @@ r, e = smtp.send{ | |||
32 | port = 2525 | 32 | port = 2525 |
33 | } | 33 | } |
34 | 34 | ||
35 | |||
36 | os.exit() | ||
37 | |||
38 | |||
39 | |||
40 | |||
41 | |||
42 | -- creates a source to send a message with two parts. The first part is | 35 | -- creates a source to send a message with two parts. The first part is |
43 | -- plain text, the second part is a PNG image, encoded as base64. | 36 | -- plain text, the second part is a PNG image, encoded as base64. |
44 | source = smtp.message{ | 37 | source = smtp.message{ |
@@ -67,13 +60,13 @@ source = smtp.message{ | |||
67 | -- chunks are loaded into memory and translation happens on the fly. | 60 | -- chunks are loaded into memory and translation happens on the fly. |
68 | [2] = { | 61 | [2] = { |
69 | headers = { | 62 | headers = { |
70 | ["content-type"] = 'image/png; name="image.png"', | 63 | ["content-type"] = 'image/png; name="luasocket.png"', |
71 | ["content-disposition"] = 'attachment; filename="image.png"', | 64 | ["content-disposition"] = 'attachment; filename="luasocket.png"', |
72 | ["content-description"] = 'a beautiful image', | 65 | ["content-description"] = 'a beautiful image', |
73 | ["content-transfer-encoding"] = "BASE64" | 66 | ["content-transfer-encoding"] = "BASE64" |
74 | }, | 67 | }, |
75 | body = ltn12.source.chain( | 68 | body = ltn12.source.chain( |
76 | ltn12.source.file(io.open("image.png", "rb")), | 69 | ltn12.source.file(io.open("luasocket.png", "rb")), |
77 | ltn12.filter.chain( | 70 | ltn12.filter.chain( |
78 | mime.encode("base64"), | 71 | mime.encode("base64"), |
79 | mime.wrap() | 72 | mime.wrap() |