aboutsummaryrefslogtreecommitdiff
path: root/test/testmesg.lua
diff options
context:
space:
mode:
authorDiego Nehab <diego@tecgraf.puc-rio.br>2004-03-21 07:50:15 +0000
committerDiego Nehab <diego@tecgraf.puc-rio.br>2004-03-21 07:50:15 +0000
commit4919a83d2271a9e43b83c7d488e3f94c850681e3 (patch)
treea2ae9a27ead4cb85cbbd857ef74bc39c01b9bf64 /test/testmesg.lua
parent2a14ac4fe4bb4dd6d7a7ec5195c15a4e3f783ad5 (diff)
downloadluasocket-4919a83d2271a9e43b83c7d488e3f94c850681e3.tar.gz
luasocket-4919a83d2271a9e43b83c7d488e3f94c850681e3.tar.bz2
luasocket-4919a83d2271a9e43b83c7d488e3f94c850681e3.zip
Changed receive function. Now uniform with all other functions. Returns nil
on error, return partial result in the end. http.lua rewritten.
Diffstat (limited to 'test/testmesg.lua')
-rw-r--r--test/testmesg.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/test/testmesg.lua b/test/testmesg.lua
index 228bbe4..8b33133 100644
--- a/test/testmesg.lua
+++ b/test/testmesg.lua
@@ -6,7 +6,7 @@ mesgt = {
6 body = { 6 body = {
7 preamble = "Some attatched stuff", 7 preamble = "Some attatched stuff",
8 [1] = { 8 [1] = {
9 body = "Testing stuffing.\r\n.\r\nGot you.\r\n.Hehehe.\r\n" 9 body = mime.eol(0, "Testing stuffing.\n.\nGot you.\n.Hehehe.\n")
10 }, 10 },
11 [2] = { 11 [2] = {
12 headers = { 12 headers = {
@@ -29,7 +29,7 @@ mesgt = {
29 ["content-transfer-encoding"] = "QUOTED-PRINTABLE" 29 ["content-transfer-encoding"] = "QUOTED-PRINTABLE"
30 }, 30 },
31 body = ltn12.source.chain( 31 body = ltn12.source.chain(
32 ltn12.source.file(io.open("message.lua", "rb")), 32 ltn12.source.file(io.open("testmesg.lua", "rb")),
33 ltn12.filter.chain( 33 ltn12.filter.chain(
34 mime.normalize(), 34 mime.normalize(),
35 mime.encode("quoted-printable"), 35 mime.encode("quoted-printable"),
@@ -46,8 +46,8 @@ mesgt = {
46-- ltn12.pump(source, sink) 46-- ltn12.pump(source, sink)
47 47
48print(socket.smtp.send { 48print(socket.smtp.send {
49 rcpt = {"<db@werx4.com>", "<diego@cs.princeton.edu>"}, 49 rcpt = "<diego@cs.princeton.edu>",
50 from = "<diego@cs.princeton.edu>", 50 from = "<diego@cs.princeton.edu>",
51 source = socket.smtp.message(mesgt), 51 source = socket.smtp.message(mesgt),
52 server = "smtp.princeton.edu" 52 server = "mail.cs.princeton.edu"
53}) 53})