-
Notifications
You must be signed in to change notification settings - Fork 21
Classes Documentation
Jeremy Dumais edited this page Jan 3, 2024
·
7 revisions
All classes are located in the jed_utils::cpp namespace
- OpportunisticSecureSMTPClient
- ForcedSecureSMTPClient
- SmtpClient
- MessageAddress
- Attachment
- PlaintextMessage
- HTMLMessage
- Credential
OpenSSL is required
OpportunisticSecureSMTPClient(const std::string &pServerName, unsigned int pPort);
std::string getServerName() const;
unsigned int getServerPort() const;
bool getBatchMode() const;
unsigned int getCommandTimeout() const;
std::string getCommunicationLog() const;
const Credential *getCredentials() const;
bool getAcceptSelfSignedCert() const;
void setServerName(const std::string &pServerName);
void setServerPort(unsigned int pPort);
void setBatchMode(bool pEnabled);
void setCommandTimeout(unsigned int pTimeOutInSeconds);
void setCredentials(const Credential &pCredential);
void setAcceptSelfSignedCert(bool pValue);
void setKeepUsingBaseSendCommands(bool pValue);
static std::string getErrorMessage(int errorCode);
static int getErrorMessage_r(int errorCode, std::string &errorMessage);
int sendMail(const jed_utils::Message &pMsg);
See the files socketerrors.h, sslerrors.h and smtpclienterrors.h
OpenSSL is required
ForcedSecureSMTPClient(const std::string &pServerName, unsigned int pPort);
std::string getServerName() const;
unsigned int getServerPort() const;
bool getBatchMode() const;
unsigned int getCommandTimeout() const;
std::string getCommunicationLog() const;
const Credential *getCredentials() const;
void setServerName(const std::string &pServerName);
void setServerPort(unsigned int pPort);
void setBatchMode(bool pEnabled);
void setCommandTimeout(unsigned int pTimeOutInSeconds);
void setCredentials(const Credential &pCredential);
void setKeepUsingBaseSendCommands(bool pValue);
static std::string getErrorMessage(int errorCode);
static int getErrorMessage_r(int errorCode, std::string &errorMessage);
int sendMail(const Message &pMsg);
See the files socketerrors.h, sslerrors.h and smtpclienterrors.h
SmtpClient(const std::string &pServerName, unsigned int pPort);
std::string getServerName() const;
unsigned int getServerPort() const;
bool getBatchMode() const;
unsigned int getCommandTimeout() const;
std::string getCommunicationLog() const;
const Credential *getCredentials() const;
void setServerName(const std::string &pServerName);
void setServerPort(unsigned int pPort);
void setBatchMode(bool pEnabled);
void setCommandTimeout(unsigned int pTimeOutInSeconds);
void setCredentials(const Credential &pCredential);
void setKeepUsingBaseSendCommands(bool pValue);
static std::string getErrorMessage(int errorCode);
static int getErrorMessage_r(int errorCode, std::string &errorMessage);
int sendMail(const Message &pMsg);
See the files socketerrors.h and smtpclienterrors.h
explicit MessageAddress(const std::string &pEmailAddress, const std::string &pDisplayName = "");
explicit operator std::string() const;
std::string getEmailAddress() const;
std::string getDisplayName() const;
jed_utils::MessageAddress toStdMessageAddress() const;
explicit Attachment(const std::string pFilename, const std::string &pName = "");
void setContentId(const std::string &pContentId);
std::string getName() const;
std::string getFilename() const;
std::string getContentId() const;
std::string getBase64EncodedFile() const;
std::string getMimeType() const;
jed_utils::Attachment toStdAttachment() const;
PlaintextMessage(const MessageAddress &pFrom,
const std::vector<MessageAddress> &pTo,
const std::string &pSubject,
const std::string &pBody,
const std::vector<MessageAddress> &pCc = {},
const std::vector<MessageAddress> &pBcc = {},
const std::vector<Attachment> &pAttachments = {});
std::string getMimeType() const override;
const MessageAddress &getFrom() const;
const std::vector<MessageAddress> &getTo() const;
size_t getToCount() const;
std::string getSubject() const;
std::string getBody() const;
const std::vector<MessageAddress> &getCc() const;
size_t getCcCount() const;
const std::vector<MessageAddress> &getBcc() const;
size_t getBccCount() const;
const std::vector<Attachment> &getAttachments() const;
size_t getAttachmentsCount() const;
HTMLMessage(const MessageAddress &pFrom,
const std::vector<MessageAddress> &pTo,
const std::string &pSubject,
const std::string &pBody,
const std::vector<MessageAddress> &pCc = {},
const std::vector<MessageAddress> &pBcc = {},
const std::vector<Attachment> &pAttachments = {});
std::string getMimeType() const override;
const MessageAddress &getFrom() const;
const std::vector<MessageAddress> &getTo() const;
size_t getToCount() const;
std::string getSubject() const;
std::string getBody() const;
const std::vector<MessageAddress> &getCc() const;
size_t getCcCount() const;
const std::vector<MessageAddress> &getBcc() const;
size_t getBccCount() const;
const std::vector<Attachment> &getAttachments() const;
size_t getAttachmentsCount() const;
Credential(const std::string &pUsername, const std::string &pPassword);
std::string getUsername() const;
std::string getPassword() const;
RecommendedAuthenticationMethod getRecommendedAuthOption() const;
void setUsername(const std::string &pUsername);
void setPassword(const std::string &pPassword);
void setRecommendedAuthOption(RecommendedAuthenticationMethod authOption);