⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ckmailman.h

📁 DES加密解密算法,西望大家共享.参考学习
💻 H
📖 第 1 页 / 共 2 页
字号:
// CkMailMan.h: interface for the CkMailMan class.
//
//////////////////////////////////////////////////////////////////////

#ifndef _CKMAILMAN_H
#define _CKMAILMAN_H


#pragma once

#include "CkString.h"
class CkByteData;
class CkEmail;
class CkEmailBundle;
class CkStringArray;
class CkMailProgress;
class CkPrivateKey;
class CkCert;

#include "CkObject.h"

/*
    IMPORTANT: Objects returned by methods as non-const pointers must be deleted
    by the calling application. 

  */
// CLASS: CkMailMan
class CkMailMan  : public CkObject
{
    public:
	CkMailMan();
	virtual ~CkMailMan();

	// BEGIN PUBLIC INTERFACE
	bool get_Utf8(void) const;
	void put_Utf8(bool b);


	// Error log retrieval and saving (these methods are common to all Chilkat VC++ classes.)
	bool SaveLastError(const char *filename);
	// Error information for the last method call formatted as XML. 
        void LastErrorXml(CkString &str);
	// Error information for the last method call formatted as HTML with "<br>" line endings. 
        void LastErrorHtml(CkString &str);
	// Error information for the last method call formatted as plain-text with CRLF line endings. 
        void LastErrorText(CkString &str);

	bool SetDecryptCert2(const CkCert &cert, CkPrivateKey &key);
	
	void get_SmtpPassword(CkString &str);
	void put_SmtpPassword(const char *str);

	void get_SmtpUsername(CkString &str);
	void put_SmtpUsername(const char *str);

	void get_DsnNotify(CkString &str);
	void put_DsnNotify(const char *str);

	void get_DsnEnvid(CkString &str);
	void put_DsnEnvid(const char *str);

	void get_DsnRet(CkString &str);
	void put_DsnRet(const char *str);

	// The last SMTP diagnostic status code
	long get_LastSmtpStatus(void);

	// Send AbortCheck events periodically according to the 
	// heartbeat interval.  0 indicates no heartbeat events..
	long get_HeartbeatMs(void);
	void put_HeartbeatMs(long millisec);

	// The maximum number of seconds to wait for new data to arrive 
	// from the POP3 server. A value of 0 (the default) sets the timeout 
	// to infinity. Setting a reasonable timeout value will prevent your 
	// application from hanging if the POP3 server stops responding.
	long get_ReadTimeout(void);
	void put_ReadTimeout(long numSeconds);

	// The maximum number of seconds to wait when connecting to a POP3 or 
	// SMTP server. The default is 5 seconds.
	long get_ConnectTimeout(void);
	void put_ConnectTimeout(long numSeconds);

	// When an email is downloaded from a POP3 server, or when it is loaded from a file, 
	// CkMailMan automatically "unwraps" it if the email is signed and/or encrypted. 
	// The results of the digital signature verification and decryption can be accessed 
	// with the following ChilkatEmail properties and methods: EncryptedBy, SignedBy, 
	// ReceivedEncrypted, ReceivedSigned, GetEncryptedByCert, and GetSignedByCert. 
	// The AutoUnwrapSecurity property controls whether the automatic unwrap occurs or not. 
	// By default, this property is set to 1, which enables the auto-unwrap. Setting the 
	// property to 0 disables it, allowing for the S/MIME message parts or envelopes to be 
	// saved or accessed. 
	bool get_AutoUnwrapSecurity(void);
	void put_AutoUnwrapSecurity(bool newVal);

	// Controls whether the email date is reset to the current date/time whenever it is 
	// re-created by loading it from a file or memory. This affects the following methods: 
	// LoadMbx, LoadEml, LoadMime, LoadXmlFile, and LoadXmlString.
	// The default value is false.
	bool get_ResetDateOnLoad(void);
	void put_ResetDateOnLoad(bool newVal);

	// Controls whether opaque signing or clear-text multipart signing is used
	// when sending signed email.
	bool get_OpaqueSigning(void);
	void put_OpaqueSigning(bool newVal);

	// Option for sending email.  If the SMTP server reports an error for any recipient,
	// then the email will not be sent, even if some recipients are valid.
	// AllOrNone is false by default.
	bool get_AllOrNone(void);
	void put_AllOrNone(bool newVal);

	// POP3 Secure Password Authentication.
	bool get_Pop3SPA(void);
	void put_Pop3SPA(bool newVal);

	// SMTP STARTTLS
	bool get_StartTLS(void);
	void put_StartTLS(bool newVal);

	// Option when sending signed email.  This controls whether intermediate
	// certificates in the chain of authentication (excluding the root) are 
	// included in a signed email.
	// EmbedCertChain is false by default.
	bool get_EmbedCertChain(void);
	void put_EmbedCertChain(bool newVal);

	// Controls whether certificates found in incoming signed emails are 
	// automatically saved to the "Chilkat" certificate store. The default is TRUE. 
	// The Chilkat cert store is located in the registry in HKEY_LOCAL_MACHINE/Software/Chilkat/SystemCertificates.
	bool get_AutoSaveCerts(void);
	void put_AutoSaveCerts(bool newVal);

	// If true, connect to POP3 server using SSL
	bool get_PopSsl(void);
	void put_PopSsl(bool newVal);

	// If true, connect to SMTP server using SSL
	bool get_SmtpSsl(void);
	void put_SmtpSsl(bool newVal);

	// This property determines how emails are sent to distribution lists. 
	// If True, emails are sent to each recipient in the list one at a 
	// time, with the "To" header field containing the email address of the recipient. 
	// If False, emails will contain <undisclosed-recipients> in the "To" header field, 
	// and are sent to 100 BCC recipients at a time. As an example, if your 
	// distribution list contained 350 email addresses, 4 emails would be sent, 
	// the first 3 having 100 BCC recipients, and the last email with 50 BCC recipients.
	// The default is value of this property is True
	bool get_SendIndividual(void);
	void put_SendIndividual(bool newVal);

	// This property should usually be left empty. The CkMailMan will by 
	// default choose the most secure login method available to prevent 
	// unencrypted username and passwords from being transmitted if possible. 
	// However, some SMTP servers may not advertise the authorization methods 
	// it accepts to some or all clients, and therefore Chilkat Mail cannot 
	// determine which authorization method to use. To force a particular method 
	// to be used, or to prevent any authorization from being used, set this 
	// property to one of the following values: "NONE", "LOGIN", "PLAIN", 
	// "CRAM-MD5", or "NTLM". 
	void get_SmtpAuthMethod(CkString &str);
	void put_SmtpAuthMethod(const char *str);

	// The Windows domain for logging into the SMTP server. Use this only 
	// if your SMTP server requires NTLM authentication, which means your 
	// SMTP server uses Integrated Windows Authentication. If there is no domain, 
	// this can be left empty
	void get_SmtpLoginDomain(CkString &str);
	void put_SmtpLoginDomain(const char *str);

	// An expression that is applied to any of the following method calls when present: 
	// LoadXmlFile, LoadXmlString, LoadMbx, CopyMail, and TransferMail. 
	// For these methods, only the emails that match the filter's expression are returned 
	// in the email bundle. In the case of TransferMail, only the matching emails are removed 
	// from the POP3 server. The filter allows any header field, or the body, to be checked. 
	// Here are some examples of expressions:
	// 
	// Body like "mortgage rates*". 
	// Subject contains "update" and From contains "chilkat" 
	// To = "info@chilkatsoft.com" 
	// 
	// Here are the general rules for forming filter expressions:
	// 
	// Any MIME header field name can be used, case is insensitive. 
	// Literal strings are double-quoted, and case is insensitive. 
	// The "*" wildcard matches 0 or more occurances of any character. 
	// Parentheses can be used to control precedence. 
	// The logical operators are: AND, OR, NOT (case insensitive) 
	// Comparison operators are: =, <, >, <=, >=, <> 
	// String comparison operators are: CONTAINS, LIKE (case insensitive)
	void get_Filter(CkString &str);
	void put_Filter(const char *str);

	// Tells the mailman to not read any messages that are greater than this size in bytes.
	long get_SizeLimit(void);
	void put_SizeLimit(long newVal);

	// Tells the mailman to never read more than this many messages at a time from the POP3 server.
	long get_MaxCount(void);
	void put_MaxCount(long newVal);

	// The port number of the POP3 server. Only needs to be set if the 
	// POP3 server is running on a non-standard port
	long get_MailPort(void);
	void put_MailPort(long newVal);

	long get_SmtpPort(void);
	void put_SmtpPort(long newVal);

	void get_PopPassword(CkString &str);
	void put_PopPassword(const char *str);
	void put_PopPasswordBase64(const char *strBase64);

	void get_PopUsername(CkString &str);
	void put_PopUsername(const char *str);

	// The hostname where the POP3 server is located
	void get_MailHost(CkString &str);
	void put_MailHost(const char *str);

	// The domain name passed when saying hello to the SMTP server.
	void get_HeloHostname(CkString &str);
	void put_HeloHostname(const char *str);

	// Get the filename of the file created by the most recent call to SendQ
	void get_LastSendQFilename(CkString &str);

	void get_Version(CkString &str);

	void get_SmtpHost(CkString &str);
	void put_SmtpHost(const char *str);

	// Automatically generate unique message ID during the mail sending process.
	// (default is true)
	bool get_AutoGenMessageId(void);
	void put_AutoGenMessageId(bool newVal);


	// A file where each message is logged in the form it was received from a POP3 server. 
	// This property is provided for help in debugging. If there is a problem with a particular 
	// email, please send a problem report to support@chilkatsoft.com, and include the email that 
	// was logged to this file.
	void get_LogMailReceivedFilename(CkString &str);

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -