lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


G'Day,

> Are you using Windows or Unix?

	Unix.

> The next step is to start adding diagnostic print() statements into
> smtp.lua.

	It never seems to get to there; I added them to source.chain() in
ltn12.lua instead, and received the following output:

(building the message here)
ltn12.source.chain()
(sending the message here here)
ltn12.source.chain()
ltn12.source.chain()->function()->if 		then
ltn12.source.chain()->function()->elseif	x-mailer:LuaSocket 2.0 (beta3)
	then
ltn12.source.chain()->function()->if 		then
ltn12.source.chain()->function()->elseif	to:XXX
	then
ltn12.source.chain()->function()->if 		then
ltn12.source.chain()->function()->elseif	mime-version:1.0
	then
ltn12.source.chain()->function()->if 		then
ltn12.source.chain()->function()->elseif	date:Thu, 01 Jan 1970 00:02:17 -0000
	then
ltn12.source.chain()->function()->if 		then
ltn12.source.chain()->function()->elseif	subject:Test Lua Email
	then
ltn12.source.chain()->function()->if 		then
ltn12.source.chain()->function()->elseif	content-type: multipart/mixed; boundary="3112196918021784018==00001"

	then
ltn12.source.chain()->function()->if 		then
ltn12.source.chain()->function()->elseif	
--3112196918021784018==00001
	then
ltn12.source.chain()->function()->if 		then
ltn12.source.chain()->function()->elseif	content-type: text/plain; charset="iso-8859-1"
	then
ltn12.source.chain()->function()->if 		then
ltn12.source.chain()->function()->elseif	
	then
ltn12.source.chain()->function()->if 		then
ltn12.source.chain()->function()->elseif	 With any luck, we are able to see a Lua-sent
			       email here. 	then
ltn12.source.chain()->function()->if 		then
ltn12.source.chain()->function()->elseif	
--3112196918021784018==00001
	then
ltn12.source.chain()->function()->if 		then
ltn12.source.chain()->function()->elseif	content-description:A simple test
	then
ltn12.source.chain()->function()->if 		then
ltn12.source.chain()->function()->elseif	content-disposition:attachment; filename="test.txt"
	then
ltn12.source.chain()->function()->if 		then
ltn12.source.chain()->function()->elseif	content-transfer-encoding:quoted-printable
	then
ltn12.source.chain()->function()->if 		then
ltn12.source.chain()->function()->elseif	content-type:text/plain; name="test.txt"
	then
ltn12.source.chain()->function()->if 		then
ltn12.source.chain()->function()->elseif	
	then
ltn12.source.chain()->function()->if 		then
ltn12.source.chain()->function()->if 		then
ltn12.source.chain()->function()->elseif	blah=0A	then
ltn12.source.chain()->function()->if 		then
ltn12.source.chain()->function()->elseif	blah=0A	then
ltn12.source.chain()->function()->if 		then
ltn12.source.chain()->function()->elseif	
	then
ltn12.source.chain()->function()->if 		then
ltn12.source.chain()->function()->elseif	
	then
ltn12.source.chain()->function()->elseif	
	then

	It continues on the `if, elseif, elseif' pattern infinitely from here.
The statements I added were:

print ("ltn12.source.chain()") --- marks that source.chain() has been called
print ("ltn12.source.chain()->function()->if ", last_out, "then") --- when last_out == ""
print ("ltn12.source.chain()->function()->elseif", last_out, "then") --- when last out != "" != nil
print ("ltn12.source.chain()->function()->else") --- last_out == nil

	My attachment (the src for this chain) is simply a plain text file with
nothing but `blah' in it, appearing once.  I do not understand why it
would keep reading in ^M after reaching EOF though.  Any suggestions?

	-- Matthew