|
Attach an inline image to the current message.
Syntax
object.AttachImage( FileName,
[ContentId] )
Parameters
- FileName
- A string that specifies the name of the file that contains the image
which should be attached to the message. If the string is empty or
the file does not exist, an error will be returned.
- ContentId
- An optional string value 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. To attach regular files to the message, use the
AttachFile method.
See Also
ContentType Property,
AttachData Method,
ExtractFile Method
|
|