Lasso Soft Inc. > Home

[ email_compose->addTextPart ]

Method

[email_compose->addTextPart] adds a new text part to a message being composed. The method requires either the -data parameter which is the text of the part to be added, or the -path parameter which specifies the name of a file that will be included as the text part.

  • Syntax
email_compose->addTextPart(-data='text')

email_compose->addTextPart(-path='include.txt')
Examples
  • Beginner

Adding a plain-text body to an [email_compose] object

The code below doesn't specify a body when creating the [email_compose] object, but instead adds the body later with the first plain-text section.

Code

var(my_msg) = email_compose(-to='to@example.org', -from='from@example.com', -subject='Multi')
$my_msg->addTextPart(-data='# Lost Rhino!')

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