Back to product page

Add Method


Adds new message part.

Type

A SmtpMsg object. Reference to new part that was created.

Syntax

  • Basic
object.Add()
The Add(object) syntax has these parts:
objectAn expression evaluating to an object of type SmtpMsgs

Remarks

Add method will add new part to the message. Part will be empty, and you will be able to add new Headers and set Text for the part.

You must not violate mail specification for the message you will add to part. It has to be regular message - it must have headers, one empty line, and text. If there are no headers - you're doing something wrong, because wodSmtp will be unable to parse it correctly (it will loop through message trying to locate any header, and will fail to do so).

You should not use this method unless you're 100% sure what you're doing. Usually, you can add parts you need using PlainText and HTMLText properties, and Attach method - wodSmtp will create appropriate parts for you.

Platforms

Windows