Back to product page
- Introduction
- License agreement
- Getting Started
- Enumerations
- Objects
- wodSmtp
- Methods
- Properties
- Authentication
- Blocking
- Certificate
- CharSet
- DNSHostname
- Hostname
- LastError
- LastErrorText
- Login
- MailFrom
- MailTo
- Message
- MyHostname
- MyIP
- Notification
- Password
- Port
- ProxyHostname
- ProxyLogin
- ProxyPassword
- ProxyPort
- ProxyType
- RequestReceipt
- RetryCount
- RetryWait
- Security
- State
- StateText
- Tag
- Timeout
- Transcript
- UseIPv6
- Version
- Events
- IwodSmtpClientNotify
- SmtpEncoder
- SmtpHdr
- SmtpHdrs
- SmtpMsg
- SmtpMsgs
- wodSmtp
- How to get support?
- Technical information
- Fast notifications interface
- Error list
AttachText Method
Adds new attachment to the message, from the string
Syntax
- Basic
object.AttachText (Text, Name, ContentType, Encoding)
The AttachText(object,Text,Name,ContentType,Encoding) syntax has these parts:
The AttachText(object,Text,Name,ContentType,Encoding) syntax has these parts:
object | An expression evaluating to an object of type SmtpMsg |
Text | Required. A String value. Text that will be used as attachment. |
Name | Required. A String value. Name of file you want to use for your attachment. |
ContentType | Required. A String value. Specifies Content-Type header value. |
Encoding | Required. A Variant value. Specifies preferred encoding type (base64 is default). |
Remarks
Unlike Attach method which requires an existing file on your disk, AttachText method will add attachment directly from a string.If you want to use normal unencrypted data inside AttachText, you need to use encUNKNOWN for Encoding type. Component will encrypt such attachment using Base64 encoding before message is send.
If any other type of encryption is used for Encoding, component will expect that data is already encrypted using encoding type that is selected.
Name of the attachment should be specified as Name argument, while value of content-type header should be specified as ContentType argument.