Back to product page

Text Property


Holds body (without headers).

Type

String

Syntax

  • Basic
object.Text [= value]
The Text(object,value) syntax has these parts:
objectAn expression evaluating to an object of type SmtpMsg
valueA String value.

Remarks

Text property holds actual message contents, without any additional data included, such as Headers or empty lines.

If the message has only one part then you will find here whatever sender of the message wrote.

If the message has more than one part (is called 'multipart') then usually you will find here text like this: This is a multi-part message in MIME format. This is text made of mail readers not capable of decoding multipart messages. In a case like this, loop through collection of Parts contained in your message, and try to find there text you're really interested in. Usually you will look where
Parts(index).Headers("Content-type")

is "text/plain" or "text/html" because this is what sender actually wrote.

Similarly, writing to this property will:
  1. Affect complete message if message has only one part
  2. Affect only text (but not text that belongs to subparts) if message is multipart.

Platforms

Windows