aboutsummaryrefslogtreecommitdiff
path: root/test/testmesg.lua
diff options
context:
space:
mode:
authorCaleb Maclennan <caleb@alerque.com>2023-11-10 09:12:04 +0300
committerCaleb Maclennan <caleb@alerque.com>2023-11-10 09:12:04 +0300
commit5c4fc93d5f4137bf4c22ddf1a048c907a4a26727 (patch)
treea9a68e1f6a9c3bfe2b64fa1c3a4098865b7d3b5d /test/testmesg.lua
parentccef3bc4e2aa6ee5b997a80aabb58f4ff0b0e98f (diff)
parent43a97b7f0053313b43906371dbdc226271e6c8ab (diff)
downloadluasocket-hjelmeland-patch-1.tar.gz
luasocket-hjelmeland-patch-1.tar.bz2
luasocket-hjelmeland-patch-1.zip
Merge branch 'master' into hjelmeland-patch-1hjelmeland-patch-1
Diffstat (limited to 'test/testmesg.lua')
-rw-r--r--test/testmesg.lua14
1 files changed, 7 insertions, 7 deletions
diff --git a/test/testmesg.lua b/test/testmesg.lua
index 135a008..8c086d5 100644
--- a/test/testmesg.lua
+++ b/test/testmesg.lua
@@ -34,11 +34,11 @@ r, e = smtp.send{
34 34
35print(r, e) 35print(r, e)
36 36
37-- creates a source to send a message with two parts. The first part is 37-- creates a source to send a message with two parts. The first part is
38-- plain text, the second part is a PNG image, encoded as base64. 38-- plain text, the second part is a PNG image, encoded as base64.
39source = smtp.message{ 39source = smtp.message{
40 headers = { 40 headers = {
41 -- Remember that headers are *ignored* by smtp.send. 41 -- Remember that headers are *ignored* by smtp.send.
42 from = "Sicrano <sicrano@tecgraf.puc-rio.br>", 42 from = "Sicrano <sicrano@tecgraf.puc-rio.br>",
43 to = "Fulano <fulano@tecgraf.puc-rio.br>", 43 to = "Fulano <fulano@tecgraf.puc-rio.br>",
44 subject = "Here is a message with attachments" 44 subject = "Here is a message with attachments"
@@ -49,18 +49,18 @@ source = smtp.message{
49 "Preamble might show up even in a MIME enabled client.", 49 "Preamble might show up even in a MIME enabled client.",
50 -- first part: No headers means plain text, us-ascii. 50 -- first part: No headers means plain text, us-ascii.
51 -- The mime.eol low-level filter normalizes end-of-line markers. 51 -- The mime.eol low-level filter normalizes end-of-line markers.
52 [1] = { 52 [1] = {
53 body = mime.eol(0, [[ 53 body = mime.eol(0, [[
54 Lines in a message body should always end with CRLF. 54 Lines in a message body should always end with CRLF.
55 The smtp module will *NOT* perform translation. It will 55 The smtp module will *NOT* perform translation. It will
56 perform necessary stuffing, though. 56 perform necessary stuffing, though.
57 ]]) 57 ]])
58 }, 58 },
59 -- second part: Headers describe content the to be an image, 59 -- second part: Headers describe content the to be an image,
60 -- sent under the base64 transfer content encoding. 60 -- sent under the base64 transfer content encoding.
61 -- Notice that nothing happens until the message is sent. Small 61 -- Notice that nothing happens until the message is sent. Small
62 -- chunks are loaded into memory and translation happens on the fly. 62 -- chunks are loaded into memory and translation happens on the fly.
63 [2] = { 63 [2] = {
64 headers = { 64 headers = {
65 ["ConTenT-tYpE"] = 'image/png; name="luasocket.png"', 65 ["ConTenT-tYpE"] = 'image/png; name="luasocket.png"',
66 ["content-disposition"] = 'attachment; filename="luasocket.png"', 66 ["content-disposition"] = 'attachment; filename="luasocket.png"',