Attach an inline image to the current message.
Syntax
object.AttachImage( FileName,
[ContentId] )
Parameters
- FileName
- A string which specifies the name of the image file to be
attached to the message. If the file is empty or does not exist, an
error will be returned by the control.
- ContentId
- An optional string which specifies the content ID that is
associated with the inline image. If this parameter is omitted or
is an empty string, a random content ID string will be
automatically generated.
Return Value
A value of zero is returned if the method succeeds.
Otherwise, a non-zero error code is returned which indicates the
cause of the failure.
Remarks
The AttachImage method attaches an inline image to the
current message. Unlike a normal file attachment, this method is
designed to be used with HTML formatted email messages that display
images attached to the message. If the message already contains one
or more images or file attachments, then it is added to the end of
the message. If the message does not contain any attachments, then it
is converted to a multipart message and the image is appended to the
message.
The AttachFile method can be used to add standard file
attachments to the message.
See Also
Boundary Property,
ContentType Property,
AttachFile Method,
ExtractFile Method
|