Public Types | |
| typedef enum OESTORE::IOEMessage::tagOEAPIBODYDELFLAGS | OEAPIBODYDELFLAGS |
| typedef enum OESTORE::IOEMessage::tagOEAPIBODYLOCATION | OEAPIBODYLOCATION |
| typedef enum OESTORE::IOEMessage::tagOEAPIMIMEPROPID | OEAPIMIMEPROPID |
| enum | tagOEAPIBODYDELFLAGS { OE_DELETE_NOFLAGS = 0, OE_DELETE_PROMOTE_CHILDREN = OE_DELETE_NOFLAGS + 1, OE_DELETE_CHILDREN_ONLY = OE_DELETE_PROMOTE_CHILDREN + 1 } |
| enum | tagOEAPIBODYLOCATION { OE_IBL_ROOT = 0, OE_IBL_PARENT = OE_IBL_ROOT + 1, OE_IBL_FIRST = OE_IBL_PARENT + 1, OE_IBL_LAST = OE_IBL_FIRST + 1, OE_IBL_NEXT = OE_IBL_LAST + 1, OE_IBL_PREVIOUS = OE_IBL_NEXT + 1 } |
| enum | tagOEAPIMIMEPROPID { OE_PID_HDR_NEWSGROUP = 2, OE_PID_HDR_NEWSGROUPS = 3, OE_PID_HDR_REFS = 4, OE_PID_HDR_SUBJECT = 5, OE_PID_HDR_FROM = 6, OE_PID_HDR_MESSAGEID = 7, OE_PID_HDR_RETURNPATH = 8, OE_PID_HDR_RR = 9, OE_PID_HDR_RETRCPTTO = 10, OE_PID_HDR_APPARTO = 11, OE_PID_HDR_DATE = 12, OE_PID_HDR_RECEIVED = 13, OE_PID_HDR_REPLYTO = 14, OE_PID_HDR_XMAILER = 15, OE_PID_HDR_BCC = 16, OE_PID_HDR_MIMEVER = 17, OE_PID_HDR_CNTTYPE = 18, OE_PID_HDR_CNTXFER = 19, OE_PID_HDR_CNTID = 20, OE_PID_HDR_CNTDESC = 21, OE_PID_HDR_CNTDISP = 22, OE_PID_HDR_CNTBASE = 23, OE_PID_HDR_CNTLOC = 24, OE_PID_HDR_TO = 25, OE_PID_HDR_PATH = 26, OE_PID_HDR_FOLLOWUPTO = 27, OE_PID_HDR_EXPIRES = 28, OE_PID_HDR_CC = 29, OE_PID_HDR_CONTROL = 30, OE_PID_HDR_DISTRIB = 31, OE_PID_HDR_KEYWORDS = 32, OE_PID_HDR_SUMMARY = 33, OE_PID_HDR_APPROVED = 34, OE_PID_HDR_LINES = 35, OE_PID_HDR_XREF = 36, OE_PID_HDR_ORG = 37, OE_PID_HDR_XNEWSRDR = 38, OE_PID_HDR_XPRI = 39, OE_PID_HDR_XMSPRI = 40, OE_PID_PAR_FILENAME = 41, OE_PID_PAR_BOUNDARY = 42, OE_PID_PAR_CHARSET = 43, OE_PID_PAR_NAME = 44, OE_PID_ATT_FILENAME = 45, OE_PID_ATT_GENFNAME = 46, OE_PID_ATT_PRITYPE = 47, OE_PID_ATT_SUBTYPE = 48, OE_PID_ATT_NORMSUBJ = 49, OE_PID_ATT_ILLEGAL = 50, OE_PID_ATT_RENDERED = 51, OE_PID_ATT_SENTTIME = 52, OE_PID_ATT_RECVTIME = 53, OE_PID_ATT_PRIORITY = 54, OE_PID_HDR_COMMENT = 55, OE_PID_HDR_ENCODING = 56, OE_PID_HDR_ENCRYPTED = 57, OE_PID_HDR_OFFSETS = 58, OE_PID_HDR_XUNSENT = 59, OE_PID_HDR_ARTICLEID = 60, OE_PID_HDR_SENDER = 61, OE_PID_ATT_SERVER = 62, OE_PID_ATT_ACCOUNT = 63, OE_PID_ATT_UIDL = 64, OE_PID_ATT_STOREMSGID = 65, OE_PID_ATT_USERNAME = 66, OE_PID_ATT_FORWARDTO = 67, OE_PID_ATT_STOREFOLDERID = 68, OE_PID_ATT_GHOSTED = 69, OE_PID_ATT_UNCACHEDSIZE = 70, OE_PID_ATT_COMBINED = 71, OE_PID_ATT_AUTOINLINED = 72, OE_PID_LAST = 73 } |
Public Member Functions | |
| HRESULT | AttachFile ([in] BSTR filename,[out, retval] long *bodyHandle) |
| HRESULT | Clone ([in] long folderId,[out, retval] OEMessage **) |
| HRESULT | Commit ([out, retval] BOOL *) |
| HRESULT | Delete ([in] BOOL permanent,[out, retval] BOOL *) |
| HRESULT | DeleteBody ([in] long bodyHandle,[in] OEAPIBODYDELFLAGS flags,[out, retval] BOOL *success) |
| HRESULT | DeleteBodyProp ([in] long bodyHandle,[in] OEAPIMIMEPROPID propId,[out, retval] BOOL *success) |
| HRESULT | DeleteBodyPropByName ([in] long bodyHandle,[in] BSTR propName,[out, retval] BOOL *success) |
| HRESULT | GetAllBody ([out, retval] BSTR *) |
| HRESULT | GetAllSource ([out, retval] BSTR *) |
| HRESULT | GetBody ([in] long maxBytesToRead,[out, retval] BSTR *) |
| HRESULT | GetBodyDisplayName ([in] long bodyHandle,[out, retval] BSTR *) |
| HRESULT | GetBodyHandle ([in] long prevBodyHandle,[in] OEAPIBODYLOCATION bodyLoc,[out, retval] long *bodyHandle) |
| HRESULT | GetBodyLength ([out, retval] long *) |
| HRESULT | GetBodyPrimaryContentType ([in] long bodyHandle,[out, retval] BSTR *priConType) |
| HRESULT | GetBodyProp ([in] long bodyHandle,[in] OEAPIMIMEPROPID propId,[out] BOOL *exist,[out, retval] BSTR *propText) |
| HRESULT | GetBodyPropByName ([in] long bodyHandle,[in] BSTR propName,[out] BOOL *exist,[out, retval] BSTR *propText) |
| HRESULT | GetBodySecondaryContentType ([in] long bodyHandle,[out, retval] BSTR *secConType) |
| HRESULT | GetBodyText ([in] long bodyHandle,[out, retval] BSTR *) |
| HRESULT | GetContentReset () |
| HRESULT | GetDisplayFrom ([out, retval] BSTR *) |
| HRESULT | GetDisplayTo ([out, retval] BSTR *) |
| HRESULT | GetFilename ([in] long bodyHandle,[out, retval] BSTR *filename) |
| HRESULT | GetFirstAttachment ([out, retval] long *bodyHandle) |
| HRESULT | GetFirstBodyProp ([in] long bodyHandle,[out] long *propId,[out, retval] BSTR *propName) |
| HRESULT | GetFolderID ([out, retval] long *) |
| HRESULT | GetHeader ([out, retval] BSTR *) |
| HRESULT | GetHeaderLength ([out, retval] long *) |
| HRESULT | GetHTMLBody ([out, retval] long *) |
| HRESULT | GetID ([out, retval] long *) |
| HRESULT | GetNextAttachment ([out, retval] long *bodyHandle) |
| HRESULT | GetNextBodyProp ([out] long *propId,[out, retval] BSTR *propName) |
| HRESULT | GetNormalSubject ([out, retval] BSTR *) |
| HRESULT | GetPlainBody ([out, retval] long *) |
| HRESULT | GetSource ([in] long maxBytesToRead,[out, retval] BSTR *) |
| HRESULT | GetSourceLength ([out, retval] long *) |
| HRESULT | GetState ([out, retval] long *) |
| HRESULT | GetSubject ([out, retval] BSTR *) |
| HRESULT | HasHighPriority ([out, retval] BOOL *) |
| HRESULT | HasLowPriority ([out, retval] BOOL *) |
| HRESULT | HasNormalPriority ([out, retval] BOOL *) |
| HRESULT | InsertBody ([in] long bodyHandle,[in] OEAPIBODYLOCATION bodyLoc,[out, retval] long *newBodyHandle) |
| HRESULT | IsBodyAttachment ([in] long bodyHandle,[out, retval] BOOL *isAttach) |
| HRESULT | IsBodyContentType ([in] long bodyHandle,[in] BSTR priContentType,[in] BSTR secContentType,[out, retval] BOOL *) |
| HRESULT | MarkAsRead ([out, retval] BOOL *) |
| HRESULT | MarkAsUnread ([out, retval] BOOL *) |
| HRESULT | SaveAsFile ([in] BSTR filename,[out, retval] BOOL *error) |
| HRESULT | SaveBodyToFile ([in] long bodyHandle,[in] BSTR path,[in] BOOL useDefaultName,[out, retval] BOOL *success) |
| HRESULT | Send ([out, retval] BOOL *) |
| HRESULT | SetBodyFromFile ([in] long bodyHandle,[in] BSTR filename,[in] BSTR priContentType,[in] BSTR secContentType,[out, retval] BOOL *success) |
| HRESULT | SetBodyProp ([in] long bodyHandle,[in] OEAPIMIMEPROPID propId,[in] BSTR propText,[out, retval] BOOL *success) |
| HRESULT | SetBodyPropByName ([in] long bodyHandle,[in] BSTR propName,[in] BSTR propText,[out, retval] BOOL *success) |
| HRESULT | SetBodyText ([in] long bodyHandle,[in] BSTR bodyText,[in] BSTR priContentType,[in] BSTR secContentType,[out, retval] BOOL *success) |
| HRESULT | SetFolderID ([in] long folderId) |
| HRESULT | SetState ([in] long state) |
| HRESULT OESTORE::IOEMessage::AttachFile | ( | [in] BSTR | filename, | |
| [out, retval] long * | bodyHandle | |||
| ) |
Add an attachment to the message. Returns the new body handle or 0 on error.
| HRESULT OESTORE::IOEMessage::Clone | ( | [in] long | folderId, | |
| [out, retval] OEMessage ** | ||||
| ) |
Create a copy of the message in the specified folder. Only those functions that manipulate bodies and SetState can be used before you call Commit because the message does not have an id yet.
NOTE: The returned message will answer TRUE to IsNull. Before calling Commit the message is not stored, so you can modify any visible property (Subject, To, etc.) and it will be stored as you set it if you call Commit.
TO SEND MAIL: If you plan to Clone the message to send it, the folderId argument is ignored. Call Send instead of Commit to save changes.
| HRESULT OESTORE::IOEMessage::Commit | ( | [out, retval] BOOL * | ) |
Commit changes made in the bodies (properties and content). If you do not call this function after modifying bodies, the changes will not be saved.
NOTE: In Windows Mail messages can only be modified from dll plugins, and while they are not currently selected.
| HRESULT OESTORE::IOEMessage::Delete | ( | [in] BOOL | permanent, | |
| [out, retval] BOOL * | ||||
| ) |
The message is moved to the 'Deleted items' folder.
After calling this function any call to any other function will fail.
If permanent is TRUE the message is permanently deleted instead of moved to the 'Deleted items' folder.
| HRESULT OESTORE::IOEMessage::DeleteBody | ( | [in] long | bodyHandle, | |
| [in] OEAPIBODYDELFLAGS | flags, | |||
| [out, retval] BOOL * | success | |||
| ) |
Delete a body. Returns TRUE on success.
| HRESULT OESTORE::IOEMessage::DeleteBodyProp | ( | [in] long | bodyHandle, | |
| [in] OEAPIMIMEPROPID | propId, | |||
| [out, retval] BOOL * | success | |||
| ) |
Remove a property specifying the id. Returns TRUE on success.
propId is a long value and can be obtained using GetFirstBodyProp / GetNextBodyProp.
| HRESULT OESTORE::IOEMessage::DeleteBodyPropByName | ( | [in] long | bodyHandle, | |
| [in] BSTR | propName, | |||
| [out, retval] BOOL * | success | |||
| ) |
Remove a property specifying the name. Returns TRUE on success.
| HRESULT OESTORE::IOEMessage::GetAllBody | ( | [out, retval] BSTR * | ) |
Get the entire body of the message. The message could be long, so this function could take a lot of time.
| HRESULT OESTORE::IOEMessage::GetAllSource | ( | [out, retval] BSTR * | ) |
Get all the source of the message. The message could be long, so this function could take a lot of time.
| HRESULT OESTORE::IOEMessage::GetBody | ( | [in] long | maxBytesToRead, | |
| [out, retval] BSTR * | ||||
| ) |
Get the first (in the first call) maxBytesToRead (if possible). Next calls to this function read next parts of the message. It returns an empty string when finished.
| HRESULT OESTORE::IOEMessage::GetBodyDisplayName | ( | [in] long | bodyHandle, | |
| [out, retval] BSTR * | ||||
| ) |
Get the display name of the body.
| HRESULT OESTORE::IOEMessage::GetBodyHandle | ( | [in] long | prevBodyHandle, | |
| [in] OEAPIBODYLOCATION | bodyLoc, | |||
| [out, retval] long * | bodyHandle | |||
| ) |
Get body handle specifying the location. If it is not found, returns 0.
| HRESULT OESTORE::IOEMessage::GetBodyLength | ( | [out, retval] long * | ) |
Get the length of the body.
| HRESULT OESTORE::IOEMessage::GetBodyPrimaryContentType | ( | [in] long | bodyHandle, | |
| [out, retval] BSTR * | priConType | |||
| ) |
Returns the primary content type of the body handle.
| HRESULT OESTORE::IOEMessage::GetBodyProp | ( | [in] long | bodyHandle, | |
| [in] OEAPIMIMEPROPID | propId, | |||
| [out] BOOL * | exist, | |||
| [out, retval] BSTR * | propText | |||
| ) |
Gets the text of the specified property. If the property does not exists it returns 0 (False).
propId is a long value and can be the value obtained using GetFirstBodyProp / GetNextBodyProp.
| HRESULT OESTORE::IOEMessage::GetBodyPropByName | ( | [in] long | bodyHandle, | |
| [in] BSTR | propName, | |||
| [out] BOOL * | exist, | |||
| [out, retval] BSTR * | propText | |||
| ) |
Gets the value of a property, specifying the property by name. If the property does not exist, returs 0 (False).
| HRESULT OESTORE::IOEMessage::GetBodySecondaryContentType | ( | [in] long | bodyHandle, | |
| [out, retval] BSTR * | secConType | |||
| ) |
Returns the secondary content type of the body handle.
| HRESULT OESTORE::IOEMessage::GetBodyText | ( | [in] long | bodyHandle, | |
| [out, retval] BSTR * | ||||
| ) |
Get the text of the specified body handle.
| HRESULT OESTORE::IOEMessage::GetContentReset | ( | ) |
After calling this function GetBody and GetSource functions starts again from the beginning.
| HRESULT OESTORE::IOEMessage::GetDisplayFrom | ( | [out, retval] BSTR * | ) |
Get the string that is displayed as from.
| HRESULT OESTORE::IOEMessage::GetDisplayTo | ( | [out, retval] BSTR * | ) |
Get the string that is displayed as to.
| HRESULT OESTORE::IOEMessage::GetFilename | ( | [in] long | bodyHandle, | |
| [out, retval] BSTR * | filename | |||
| ) |
Get the filename prop (equivalent to: GetBodyProp(bodyHandle, OE_PID_PAR_FILENAME, exist, filename).
This prop is used as the filename of the attachment.
| HRESULT OESTORE::IOEMessage::GetFirstAttachment | ( | [out, retval] long * | bodyHandle | ) |
Get the first attachment of the message. Returns 0 if the message does not have attachments.
| HRESULT OESTORE::IOEMessage::GetFirstBodyProp | ( | [in] long | bodyHandle, | |
| [out] long * | propId, | |||
| [out, retval] BSTR * | propName | |||
| ) |
Get the text of the first property of the body.
If the property does not exist propId is -1. Otherwise, contains property id.
| HRESULT OESTORE::IOEMessage::GetFolderID | ( | [out, retval] long * | ) |
Get the folder id where it belongs.
| HRESULT OESTORE::IOEMessage::GetHeader | ( | [out, retval] BSTR * | ) |
Get the header of the message.
| HRESULT OESTORE::IOEMessage::GetHeaderLength | ( | [out, retval] long * | ) |
Get the length of the header of the message.
| HRESULT OESTORE::IOEMessage::GetHTMLBody | ( | [out, retval] long * | ) |
Get the first HTML body handle (if any) of the message or 0 if the message has no HTML body.
| HRESULT OESTORE::IOEMessage::GetID | ( | [out, retval] long * | ) |
Get the id.
| HRESULT OESTORE::IOEMessage::GetNextAttachment | ( | [out, retval] long * | bodyHandle | ) |
Get next attachment of the message. Returns 0 if the message does not have attachments.
| HRESULT OESTORE::IOEMessage::GetNextBodyProp | ( | [out] long * | propId, | |
| [out, retval] BSTR * | propName | |||
| ) |
Get the text of the next property of the body.
If the property does not exist propId is -1. Otherwise, contains property id.
| HRESULT OESTORE::IOEMessage::GetNormalSubject | ( | [out, retval] BSTR * | ) |
Get the normalized subject.
| HRESULT OESTORE::IOEMessage::GetPlainBody | ( | [out, retval] long * | ) |
Get the first text (plain) body handle (if any) of the message or 0 if the message has no plain body. If the message is multi-part this function is useless.
| HRESULT OESTORE::IOEMessage::GetSource | ( | [in] long | maxBytesToRead, | |
| [out, retval] BSTR * | ||||
| ) |
Get the first (in the first call) maxBytesToRead (if possible) of the message. Next calls to this function read next parts of the message. It returns an empty string when finished.
| HRESULT OESTORE::IOEMessage::GetSourceLength | ( | [out, retval] long * | ) |
Get the entire message length.
| HRESULT OESTORE::IOEMessage::GetState | ( | [out, retval] long * | ) |
Get the message's state flags. See OEAPIMSGSTATE for the state list.
| HRESULT OESTORE::IOEMessage::GetSubject | ( | [out, retval] BSTR * | ) |
Get the subject.
| HRESULT OESTORE::IOEMessage::HasHighPriority | ( | [out, retval] BOOL * | ) |
Returns true if the message has high priority.
| HRESULT OESTORE::IOEMessage::HasLowPriority | ( | [out, retval] BOOL * | ) |
Returns true if the message has low priority.
| HRESULT OESTORE::IOEMessage::HasNormalPriority | ( | [out, retval] BOOL * | ) |
Returns true if the message has normal priority.
| HRESULT OESTORE::IOEMessage::InsertBody | ( | [in] long | bodyHandle, | |
| [in] OEAPIBODYLOCATION | bodyLoc, | |||
| [out, retval] long * | newBodyHandle | |||
| ) |
Taking bodyHandle as reference, inserts a new body using bodyLoc as the relation between the new body and bodyHandle.
Returns 0 on error.
NOTE: Only messages which have a 'multipart' primary content type can have child bodies inserted.
| HRESULT OESTORE::IOEMessage::IsBodyAttachment | ( | [in] long | bodyHandle, | |
| [out, retval] BOOL * | isAttach | |||
| ) |
Returns TRUE if the specified body is an attachment.
| HRESULT OESTORE::IOEMessage::IsBodyContentType | ( | [in] long | bodyHandle, | |
| [in] BSTR | priContentType, | |||
| [in] BSTR | secContentType, | |||
| [out, retval] BOOL * | ||||
| ) |
Returns TRUE if the body is of the specified content type (see 'http://msdn2.microsoft.com/en-us/library/ms526508.aspx' for valid content types.
| HRESULT OESTORE::IOEMessage::MarkAsRead | ( | [out, retval] BOOL * | ) |
Mark as read.
| HRESULT OESTORE::IOEMessage::MarkAsUnread | ( | [out, retval] BOOL * | ) |
Mark as unread.
| HRESULT OESTORE::IOEMessage::SaveAsFile | ( | [in] BSTR | filename, | |
| [out, retval] BOOL * | error | |||
| ) |
Save message source to the specified filename.
| HRESULT OESTORE::IOEMessage::SaveBodyToFile | ( | [in] long | bodyHandle, | |
| [in] BSTR | path, | |||
| [in] BOOL | useDefaultName, | |||
| [out, retval] BOOL * | success | |||
| ) |
Save the specified body in a file.
If useDefaultName is TRUE, path variable specifies only a path and the filepart is taken from the OE_PID_PAR_FILENAME property.
Returns TRUE on success.
| HRESULT OESTORE::IOEMessage::Send | ( | [out, retval] BOOL * | ) |
The message is committed (all the changes made are saved) and sent using the default account of current user. Returns TRUE on success. Do not call Commit if you want to Send a new email. Emails stored in any folder can be sent too (it is like a forward function).
NOTE: If you create a new message and call Send, the message may no longer be present, so do not use the object after calling this function for new messages.
NOTE2: The message will be saved in the Outbox folder and will be sent the next 'Send' / 'Send and Receive' process.
IMPORTANT: This function does not work on Windows Mail and should ONLY BE USED WHILE OE IS NOT RUNNING, because if OE is running some errors can be experienced while synchronizing with the server.
To send a message with OE/WM running use OEAPIObj::SendMessage.
| HRESULT OESTORE::IOEMessage::SetBodyFromFile | ( | [in] long | bodyHandle, | |
| [in] BSTR | filename, | |||
| [in] BSTR | priContentType, | |||
| [in] BSTR | secContentType, | |||
| [out, retval] BOOL * | success | |||
| ) |
Set the body content from the specified file. This function is useful if you want to add an attachment.
The filepart of filename is used to set the property OE_PID_PAR_FILENAME.
| HRESULT OESTORE::IOEMessage::SetBodyProp | ( | [in] long | bodyHandle, | |
| [in] OEAPIMIMEPROPID | propId, | |||
| [in] BSTR | propText, | |||
| [out, retval] BOOL * | success | |||
| ) |
Sets the value of the property, specifying the property by id. Returns TRUE on success.
propId is a long value and can be the value obtained using GetFirstBodyProp / GetNextBodyProp.
| HRESULT OESTORE::IOEMessage::SetBodyPropByName | ( | [in] long | bodyHandle, | |
| [in] BSTR | propName, | |||
| [in] BSTR | propText, | |||
| [out, retval] BOOL * | success | |||
| ) |
Sets the value of the property, specifying the property by name. Returns TRUE on success.
This function can be used to set a custom property.
| HRESULT OESTORE::IOEMessage::SetBodyText | ( | [in] long | bodyHandle, | |
| [in] BSTR | bodyText, | |||
| [in] BSTR | priContentType, | |||
| [in] BSTR | secContentType, | |||
| [out, retval] BOOL * | success | |||
| ) |
Set the text of the specified body handle. The type of the text must be specified, if you do not want to change it, send empty strings in both parameters and the type will remain unchanged.
| HRESULT OESTORE::IOEMessage::SetFolderID | ( | [in] long | folderId | ) |
Set the new message's folder id.
NOTE: Only use this function when you create a new OEMessage.
| HRESULT OESTORE::IOEMessage::SetState | ( | [in] long | state | ) |
Set the state flags. See OEAPIMSGSTATE for the state list. Only useful when a message is cloned, the new message can change state. Messages stored cannot change their state.
Developed by Nektra