[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_queue]
or [email_immediate]
for sending.
var(msg) = email_compose(...)
email_immediate(-data=$msg->data, -from=$msg->from, -recipients=$msg->recipients)
The code below will create a message with two different text parts and then queue it up to be sent.
Code
var(my_msg = email_compose(
-to='to@example.org',
-from='from@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
)
Result
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.
©LassoSoft Inc 2015 | Web Development by Treefrog Inc | Privacy | Legal terms and Shipping | Contact LassoSoft
Recent Comments