#include <mmsmail.h>
Public Member Functions | |
| MMSMail (const std::string _subject, const std::string _returnAddress, const std::string _host) | |
| Constructor of class MMSMail. | |
| ~MMSMail () | |
| Destructor of class MMSMail. | |
| std::string | getSubject () const |
| Returns the mail subject line. | |
| void | setSubject (const std::string subject) |
| Sets the mail subject line. | |
| std::string | getReturnAddress () const |
| Returns the mails return addresss. | |
| void | setReturnAddress (std::string returnAddress) |
| Sets the mails return address. | |
| std::string | getRecipient (int index) const |
| Returns the recipient at the given index. | |
| const int | getRecipientCount () const |
| Returns the current number of recipients. | |
| void | addRecipient (std::string recipient) |
| Adds a recipient to the current mail. | |
| void | removeRecipient (int index) |
| Removes a recipient at the given index. | |
| std::string | getMailBody () const |
| Returns the mails message text. | |
| void | setMailBody (std::string mailBody) |
| Sets the mails message text. | |
| std::string | getHost () const |
| Returns the current mail servers address. | |
| void | setHost (std::string host) |
| Sets the mail servers address. | |
| void | setAuthData (const std::string &user, const std::string &password) |
| Use this to set user and password for the smtp server connection, if necessary. | |
| void | send () |
| Sends the mail to the specified recipients. | |
Private Attributes | |
| std::string | subject |
| std::string | returnAddress |
| std::vector< std::string > | recipients |
| std::string | mailBody |
| std::string | host |
| vmime::ref< vmime::net::transport > | transportService |
This class provides functions to to send e-mails via a smtp server. Secure connections are note supported.
Definition at line 50 of file mmsmail.h.
| MMSMail::MMSMail | ( | const std::string | _subject, | |
| const std::string | _returnAddress, | |||
| const std::string | _host | |||
| ) |
Constructor of class MMSMail.
| _subject | [in] the mail subject line | |
| _returnAddress | [in] the return address | |
| _host | [in] the smtp server name |
Definition at line 35 of file mmsmail.cpp.
| MMSMail::~MMSMail | ( | ) |
| std::string MMSMail::getSubject | ( | ) | const |
| void MMSMail::setSubject | ( | const std::string | subject | ) |
Sets the mail subject line.
| subject | [in] the mail subject |
Definition at line 49 of file mmsmail.cpp.
| std::string MMSMail::getReturnAddress | ( | ) | const |
| void MMSMail::setReturnAddress | ( | std::string | returnAddress | ) |
Sets the mails return address.
| returnAddress | [in] the mails return address |
Definition at line 57 of file mmsmail.cpp.
| std::string MMSMail::getRecipient | ( | int | index | ) | const |
Returns the recipient at the given index.
| index | [in] index of the recipient (first element = 0) |
Definition at line 61 of file mmsmail.cpp.
| const int MMSMail::getRecipientCount | ( | ) | const |
| void MMSMail::addRecipient | ( | std::string | recipient | ) |
| void MMSMail::removeRecipient | ( | int | index | ) |
Removes a recipient at the given index.
| index | [in] index of the recipient (first element = 0) |
Definition at line 76 of file mmsmail.cpp.
| std::string MMSMail::getMailBody | ( | ) | const |
| void MMSMail::setMailBody | ( | std::string | mailBody | ) |
Sets the mails message text.
| mailBody | [in] Message text of the mail |
Definition at line 84 of file mmsmail.cpp.
| std::string MMSMail::getHost | ( | ) | const |
| void MMSMail::setHost | ( | std::string | host | ) |
Sets the mail servers address.
| host | [in] the mail servers address |
Definition at line 92 of file mmsmail.cpp.
| void MMSMail::setAuthData | ( | const std::string & | user, | |
| const std::string & | password | |||
| ) |
Use this to set user and password for the smtp server connection, if necessary.
| user | [in] the ftp user | |
| password | [in] the password |
Definition at line 101 of file mmsmail.cpp.
| void MMSMail::send | ( | ) |
Sends the mail to the specified recipients.
| MMSError | if errors occure during the mail send. |
Definition at line 107 of file mmsmail.cpp.
std::string MMSMail::subject [private] |
std::string MMSMail::returnAddress [private] |
std::vector<std::string> MMSMail::recipients [private] |
std::string MMSMail::mailBody [private] |
std::string MMSMail::host [private] |
vmime::ref<vmime::net::transport> MMSMail::transportService [private] |