Back to product page

CreateTextHtmlAttachment Method


Creates multipart message with attachment.

Syntax

  • Basic
object.CreateTextHtmlAttachment (From, To, Subject, PlainText, HTMLText, Attachment)
The CreateTextHtmlAttachment(object,From,To,Subject,PlainText,HTMLText,Attachment) syntax has these parts:
objectAn expression evaluating to an object of type wodSmtp
FromRequired. A String value. Specifies sender of the message.
ToRequired. A String value. Specifies recipient of the message.
SubjectRequired. A String value. Specifies message subject.
PlainTextRequired. A String value. Holds text/plain part of the message.
HTMLTextRequired. A String value. Holds text/html part of the message.
AttachmentRequired. A String value. Holds full path to the attachment.

Remarks

CreateTextHtmlAttachment method is a one-line-command that can be used in your applications to create email message that has three parts: text/plain part, text/html part, and one attachment. Message will not be sent. You can add more attachments if needed using Message.Attach method. You can also change message headers, or any other field necessary.

It is not required to use CreateTextHtmlAttachment method to send such message - you can create similar message from scratch using appropriate properties and methods. By using this method, wodSmtp creates 'template' message and puts appropriate values to appropriate parts.

To finally send the message, use SendMessage method.

Platforms

Windows