ckemail.h
来自「DES加密解密算法,西望大家共享.参考学习」· C头文件 代码 · 共 710 行 · 第 1/3 页
H
710 行
// Retrieves the contentID of an attachment. Indexing begins at 0.
bool GetAttachmentContentID(long index, CkString &strContentID);
// Retrieves the content type of an attachment. Indexing begins at 0.
bool GetAttachmentContentType(long index, CkString &strContentType);
// Returns one of the header fields for an attachment.
bool GetAttachmentHeader(long index, const char *fieldName, CkString &fieldValue);
// Retrieves an attachment's size in bytes. Indexing begins at 0.
long GetAttachmentSize(long index);
// Retrieves an attachment's data as a string. All CRLF sequences will be translated to
// single newline characters. Indexing begins at 0.
bool GetAttachmentString(long index, const char *charset, CkString &str);
// Save all of this email's attachments to a directory. Return True if successful.
bool SaveAllAttachments(const char *directory);
// Save one of the email's attachments to a directory. Return True if successful. Indexing begins at 0.
bool SaveAttachedFile(long index, const char *directory);
// Retrieves an attachment's binary data. Indexing begins at 0.
bool GetAttachmentData(long index, CkByteData &buffer);
// Drops a single attachment from the email. Returns True if successful. Indexing begins at 0.
bool DropSingleAttachment(long index);
// Change the filename of one of the email attachments. Return True if successful. Indexing begins at 0.
bool SetAttachmentFilename(long index, const char *filename);
// Retrieves an attachment's filename. Indexing begins at 0
bool GetAttachmentFilename(long index, CkString &strFilename);
void AddAttachmentHeader(int index, const char *fieldName, const char *fieldValue);
// Removes all attachments from the email.
void DropAttachments(void);
// Adds a file as an attachment to the email. Returns the MIME content-type of the attachment,
// which is inferred based on the filename extension.
// Returns true for success and false for failure.
bool AddFileAttachment(const char *fileName, CkString *strContentType);
bool AddFileAttachment(const char *fileName, CkString &strContentType)
{
return AddFileAttachment(fileName,&strContentType);
}
// Same as AddFileAttachment, but the content type can be explicitly specified
bool AddFileAttachment2(const char *fileName, const char *contentType);
// Adds a memory buffer as an attachment to the email. The fileName is passed in as the name
// of the file that would get created if the recipient saves the attachment to disk.
// Returns true for success and false for failure.
bool AddDataAttachment(const char *fileName, const unsigned char *data, unsigned long dataLen);
// New as of 19-Aug-2006
bool AddStringAttachment(const char *fileName, const char *str);
bool AddStringAttachment2(const char *fileName, const char *str, const char *charset);
bool AddRelatedString(const char *nameInHtml, const char *str, const char *charset, CkString *cid);
bool AddRelatedString(const char *nameInHtml, const char *str, const char *charset, CkString &cid)
{
return AddRelatedString(nameInHtml,str,charset,&cid);
}
/*
Mail Merge Features
Any number of replacement pattern/string pairs can be defined by calling SetReplacePattern
multiple times. When an email is sent, each replacement pattern is replaced by its corresponding
replacement string.
*/
long get_NumReplacePatterns(void);
// Gets one of the replacement strings, if any replacment patterns have been defined. This is a mail-merge feature.
bool GetReplaceString2(const char *pattern, CkString &str);
// Gets one of the replacement strings, if any replacment patterns have been defined. This is a mail-merge feature. Indexing begins at 0.
bool GetReplaceString(long index, CkString &str);
// Gets one of the replacement patterns, if any have been defined. This is a mail-merge feature. Indexing begins at 0.
bool GetReplacePattern(long index, CkString &strPattern);
// Define a replacement pattern. When the mailman sends this email, it will first find all occurances of each pattern
// and substitute the replacment string.
bool SetReplacePattern(const char *pattern, const char *replaceString);
// Generates a unique filename for this email. The filename will be different each time the method is called.
void GenerateFilename(CkString &strFilename);
// Adds multiple recipients to the blind carbon-copy, carbon-copy, or "to" recipient list.
// The parameter is a string containing a comma separated list of full email addresses.
// For example: "Chilkat Support" <support@chilkatsoft.com>, "Chilkat Sales" <sales@chilkatsoft.com>
// Returns True if successful.
bool AddMultipleBcc(const char *commaSeparatedAddresses);
bool AddMultipleCC(const char *commaSeparatedAddresses);
bool AddMultipleTo(const char *commaSeparatedAddresses);
// Retrieves the value of a header field as a utf-8 string. If the header field is B or Q encoded,
// it is automatically decoded, converted to utf-8, and returned.
bool GetHeaderField(const char *fieldName, CkString &strFieldData);
// Returns a blind carbon-copy, carbon-copy, or "to" recipient. Indexing begins at 0.
bool GetBcc(long index, CkString &str);
bool GetCC(long index, CkString &str);
bool GetTo(long index, CkString &str);
bool GetBccAddr(long index, CkString &str);
bool GetCcAddr(long index, CkString &str);
bool GetToAddr(long index, CkString &str);
bool GetBccName(long index, CkString &str);
bool GetCcName(long index, CkString &str);
bool GetToName(long index, CkString &str);
// Clears the list of blind carbon-copy, carbon-copy, or "to" recipients.
void ClearBcc(void);
void ClearCC(void);
void ClearTo(void);
// Adds a recipient to the blind carbon-copy list. address is required, but name may be empty.
// Returns True if successful.
bool AddBcc(const char *friendlyName, const char *emailAddress);
// Adds a recipient to the carbon-copy list. address is required, but name may be empty.
// Returns True if successful.
bool AddCC(const char *friendlyName, const char *emailAddress);
// Adds a recipient to the "to" list. address is required, but name may be empty.
// Returns True if successful.
bool AddTo(const char *friendlyName, const char *emailAddress);
// Returns the email as MIME text.
void GetMime(CkString &strMime);
// Returns the email converted to XML.
void GetXml(CkString &strXml);
// Saves the email in XML format to a file.
bool SaveXml(const char *filename);
// Saves the email in MIME format to a file.
bool SaveEml(const char *filename);
// Emails received from a POP3 server will typically have a UIDL, but an email
// created dynamically by a program will not. (POP3 servers add UIDLs to emails.)
void get_Uidl(CkString &str);
// Set this property to True for a return-receipt.
bool get_ReturnReceipt(void);
void put_ReturnReceipt(bool newVal);
// Size in bytes of the email, including attachments.
long get_Size(void);
// Number of multipart/alternatives. (Such as HTML and/or plain-text.)
long get_NumAlternatives(void);
// For HTML emails, the number of related items including images, style sheets, etc. included in the email.
long get_NumRelatedItems(void);
// Set to true to send this email with S/MIME encryption.
bool get_SendEncrypted(void);
void put_SendEncrypted(bool newVal);
// Set this property to send an email to a list of recipients stored in a
// plain text file. The file format is simple: one recipient per line, no comments allowed,
// blank lines are ignored. There is no need to add "To", "CC", or "Bcc" recipients if this
// property is set.
// Setting this property is equivalent to adding a "CKX-FileDistList" header field to the email.
// Chilkat Mail treats header fields beginning with "CKX-" specially in that these fields are never
// transmitted with the email when sent. However, CKX fields are saved and restored when saving to
// XML or loading from XML (or MIME).
// When sending an email containing a "CKX-FileDistList" header field, Chilkat Mail will read the
// distribution list file and send the email to each recipient. Emails can be sent individually,
// or with BCC, 100 recipients at a time. (see the CkMailMan.SendIndividual property).
void get_FileDistList(CkString &str);
void put_FileDistList(const char *str);
// Set this property to send an email to an Outlook distribution list. The string format is to
// include the folder path and distribution list name such as "Personal Folders/Contacts/My List".
// Forward slashes should be used instead of backslashes. There is no need to add "To", "CC", or
// "Bcc" recipients if this property is set.
void get_Charset(CkString &str);
void put_Charset(const char *str);
// Controls whether files are overwritten when saving attachments.
bool get_OverwriteExisting(void);
void put_OverwriteExisting(bool newVal);
// Set this property to true to send a digitally signed email. If this property and
// SendEncrypted are both true, the email will be sent both encrypted and signed
bool get_SendSigned(void);
void put_SendSigned(bool newVal);
// If the email was received in encrypted format, this property contains the details of the
// certificate used to encrypt the email.
void get_EncryptedBy(CkString &str);
// If the email was received with encrypted parts, either in whole or part, this property is TRUE if all encrypted
// parts were successfully decrypted. (Chilkat Mail automatically decrypts messages when they are read from a POP3 server.)
bool get_Decrypted(void);
// If the email was received with a digital signature, this property is true if all signatures
// were verified to be valid. (Chilkat Mail automatically verifies digital signatures when an
// email is read from a POP3 server.)
bool get_SignaturesValid(void);
// If the email was digitally signed, this property contains the details of the signer.
void get_SignedBy(CkString &str);
// True if this email was originally received with an attached digital signature.
bool get_ReceivedSigned(void);
// True if this email was originally received with S/MIME encryption.
bool get_ReceivedEncrypted(void);
// Number of file attachments.
long get_NumAttachments(void) const;
// IMPORTANT: Unless otherwise noted, strings are always passed/returned in the utf-8 character encoding.
void get_FromAddress(CkString &str);
void put_FromAddress(const char *str);
// IMPORTANT: Unless otherwise noted, strings are always passed/returned in the utf-8 character encoding.
void get_FromName(CkString &str);
void put_FromName(const char *str);
// The date converted to local time.
void get_LocalDate(SYSTEMTIME &sysTime);
// The date in GMT time.
void get_EmailDate(SYSTEMTIME &sysTime);
void put_LocalDate(SYSTEMTIME &sysTime);
// The date in GMT time.
void put_EmailDate(SYSTEMTIME &sysTime);
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?