| BOOL WINAPI MimeAttachImage(
|
| |
HMESSAGE hMessage, |
|
| |
LPCTSTR lpszImageFile, |
|
| |
LPCTSTR lpszContentId |
|
| );
|
The MimeAttachImage function attaches the specified file
to the message as an inline image.
Parameters
- hMessage
- Handle to the message.
- lpszFileName
- Pointer to a null-terminated string which specifies the name of
the image file to be attached to the message. This parameter cannot
be NULL and must specify the name of an existing file.
- lpszContentId
- Pointer to a null-terminated string which specifies the content
ID that is associated with the inline image. If this parameter is
NULL, a random content ID string will be automatically
generated.
Return Value
If the function succeeds, the return value is non-zero. If the
function fails, the return value is zero. To get extended error
information, call MimeGetLastError.
Remarks
The MimeAttachImage function enables an application to
attach an inline image to the message. Unlike a normal file
attachment, this function is designed to be used with HTML
formatted e-mail messages that display images attached to the
message. The lpszContentId parameter specifies the content
ID string that is used with the HTML image tag to reference that
image.
If the specified message is not a multipart message, it is
marked as multipart and the attached image file is appended to the
message. If the message is already a multipart message, an
additional part is created and the attachment is added to the
message.
To attach regular files to the message, use the
MimeAttachFile function.
Requirements
Client: Requires Windows 7, Windows Vista or Windows
XP.
Server: Requires Windows Server 2008 or Windows Server
2003.
Header: Include cstools7.h.
Library: Use csmsgav7.lib.
Unicode: Implemented as Unicode and ANSI versions.
See Also
MimeAttachData, MimeAttachFile, MimeComposeMessage
|