Lasso Soft Inc. > Home

[ email_compose->asString ]

Method

Outputs the contents of an [email_compose] object as a string. Calling this member method produces the raw email text of the message being composed.

  • Syntax
var(my_msg) = email_compose(...)
$my_msg->asString
Examples
  • Beginner

Inspecting the raw content of an [email_compose] object

The code below composes an email through various steps and then allows you to see what will be produced.

Code

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

Result

MIME-Version: 1.0
X-Mailer: Lasso Professional 9.0
Message-ID: <014F359B-80CC-42DB-9070-E3E889A60A4D@127.0.0.1>
Date: Thu, 3 Feb 2011 17:08:59 -0500
To: to@example.org
From: from@example.com
Subject: Multi
Content-Type: multipart/alternative; boundary="====_-LASSO-E688FEA8-7C4E-4FB1-8505-2DBE5A728CCF-_===="

--====_-LASSO-E688FEA8-7C4E-4FB1-8505-2DBE5A728CCF-_====
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

# Lost Rhino!

--====_-LASSO-E688FEA8-7C4E-4FB1-8505-2DBE5A728CCF-_====
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

<h1>Lost Rhino!</h1>

--====_-LASSO-E688FEA8-7C4E-4FB1-8505-2DBE5A728CCF-_====--

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