Mail module

classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|

Mail module

Hugo <Nabble>
The mail module should be able to send a multi-part message, with HTML and TEXT content. One idea is to make the body entry a luan table:
smtp.send {
	from = "me@example.com";
	to = "you@example.com";
	subject = "luan";
	body = {
		text = [[hello]],
		html = [[<b>hello</b>]]
	}
}
Reply | Threaded
Open this post in threaded view
|

Re: Mail module

Hugo <Nabble>
We also need a "from_name" field, which is the alias of the "from" address.
Reply | Threaded
Open this post in threaded view
|

Re: Mail module

fschmidt
Administrator
Hugo <Nabble> wrote
We also need a "from_name" field, which is the alias of the "from" address.
No, you just do:
from = "Hugo <hugo@nabble.com>"
Apparently this is standard.  It also makes lists of addresses much easier.
Woe to those who call bad good and good bad -- Isaiah 5:20
Following the Old Testament, not evil modern culture
Reply | Threaded
Open this post in threaded view
|

Re: Mail module

Hugo <Nabble>
Okay, this works fine.

Assigning this back to you to implement the multi-part feature.
Reply | Threaded
Open this post in threaded view
|

Re: Mail module

fschmidt
Administrator
In reply to this post by Hugo <Nabble>
done in rev 271
Woe to those who call bad good and good bad -- Isaiah 5:20
Following the Old Testament, not evil modern culture
Reply | Threaded
Open this post in threaded view
|

Re: Mail module

Hugo <Nabble>
Something is wrong with your implementation. I never see the HTML part when I receive the email (try rev 120 of the jeans project). I suspect this is related to the order of the parts. The html part is always the first to be printed in the raw email. Maybe it should be the last one?
Reply | Threaded
Open this post in threaded view
|

Re: Mail module

fschmidt
Administrator
fixed in rev 274
Woe to those who call bad good and good bad -- Isaiah 5:20
Following the Old Testament, not evil modern culture
Reply | Threaded
Open this post in threaded view
|

Re: Mail module

Hugo <Nabble>
Thanks, it is working fine now.
Reply | Threaded
Open this post in threaded view
|

Re: Mail module

fschmidt
Administrator
closing
Woe to those who call bad good and good bad -- Isaiah 5:20
Following the Old Testament, not evil modern culture