[email_compose] allows an email message to be composed. For most purposes the
[email_send] method itself provides enough email composition options, but the
[email_compose] type can be used if more control is needed. Objects of this type are usually passed to
[email_immediate] for sending.
var(msg) = email_compose(...) email_immediate(-data=$msg->data, -from=$msg->from, -recipients=$msg->recipients)
email_compose->oncreate(-to = ?, -FROM = ?, -cc = ?, -bcc = ?, -subject = ?, -sender = ?, -replyto = ?, -body = ?, -html = ?, -date = ?, -contentType = ?, -characterset = ?, -transferencoding = ?, -contentdisposition = ?, -headertype = ?, -extramimeheaders = ?, -attachments = ?, -attachment = ?, -htmlimages = ?, -parts = ?)
email_compose->addtextpart(-data = ?, -path = ?)
email_compose->addhtmlpart(-data = ?, -path = ?, -images = ?)
email_compose->addattachment(-data = ?, -name = ?, -path = ?, -type = ?)
email_compose->addpart(-data = ?)
email_compose->data(-prefix::boolean = ?, -force::boolean = ?)
The code below will create a message with two different text parts and then queue it up to be sent.
var(my_msg = email_compose( -firstname.lastname@example.org', -email@example.com', -subject='Re: Lasso Logo', -body='How about a Rhino?') ) $my_msg->addTextPart(-data='additional part') email_queue( -host='smtp.example.com', -data=$my_msg->data, -from=$my_msg->from, -recipients=$my_msg->recipients )
The composed email will be added to the queue
Please note that periodically LassoSoft will go through the notes and may incorporate information from them into the documentation. Any submission here gives LassoSoft a non-exclusive license and will be made available in various formats to the Lasso community.