Lasso Soft Inc. > Home

[ email_compose ]


[Email_Compose] allows an email message to be composed. For most purposes the [Email_Send] tag 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. [Email_Compose] accepts the same parameters as [Email_Send] including -To, -From, -Subject, -Cc, -Bcc, -Sender, -ReplyTo, etc. It accepts a -Body parameter to setup a default text part and an -HTML parameter to set up a default HTML part. The -ContentType, -CharacterSet, -TransferEncoding, -ContentDisposition, -ExtraMIMEHeaders, and -Attachments can also be specified. In addition, the type supports four member methods that allow individual parts to be added to the message. [Email_Compose->AddTextPart] adds a text part to the message (accepts the text to add or a -Path parameter referencing a file to add). [Email_Compose->AddHTMLPart] adds an HTML part to the message (accepts the text to add or a -Path parameter referencing a file to add). [Email_Compose->AddAttachemnt] adds an attachment to the message (accepts the text to add or a -Path parameter referencing a file to add as well as a name parameter that specifies the name of the included file). And, [Email_Compose->AddPart] adds a generic part to the message (accepts the data of the part and a name for the part). The type also supports four member methods that are used by the [Email_Queue] or [Email_Immediate] methods. These include [Email_Compose->Recipients], [Email_Compose->Data], [Email_Compose->From], and [Email_Compose->Summary]. These methods are not usually called directly.

  • 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:
  • 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.


var(my_msg) = email_compose(-to='', -from='',
    -subject='Re: Subj', -body='Good Deal')    
$my_msg->addTextPart(-data='additional part')
email_queue(-host='', -data=$my_msg->data, -from=$my_msg->from, 

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 2014 | Web Development by Treefrog Inc | PrivacyLegal terms and Shipping | Contact LassoSoft