Lasso Soft Inc. > Home

[ email_compose ]

Type

[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.

  • Syntax
  • Methods
  • Traits
var(msg) = email_compose(...)
email_immediate(-data=$msg->data, -from=$msg->from, -recipients=$msg->recipients)
Has methods:
  • 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->asString()
  • email_compose->mime_boundary()
  • email_compose->mime_boundary=(mime_boundary)
  • email_compose->mime_contenttype()
  • email_compose->mime_contenttype=(mime_contenttype)
  • email_compose->mime_hdrs()
  • email_compose->mime_hdrs=(mime_hdrs)
  • 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 = ?)
  • email_compose->recipients()
  • email_compose->FROM()
  • email_compose->find(VALUE)
Has traits:
Examples
  • Beginner

Creating a multi-part message

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

Recent Comments

No Comments found

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. > Home

 

 

©LassoSoft Inc 2015 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft