FougTools
0.7.0dev-046fb6a
Handy tools for C++, Qt and OpenCascade
|
Provides service to send messages through SMTP. More...
#include <qttools/network/mail_send.h>
Public Member Functions | |
MailSend () | |
~MailSend () | |
int | timeout () const |
Maximum waiting delay when operating with the SMTP server. More... | |
void | setTimeout (int msecs) |
bool | connectToSmtpServer (const SmtpAccount &account) |
Try to connect to SMTP server using account . More... | |
bool | sendMessage (const Message &msg) |
Try to send message msg . More... | |
QString | errorString () const |
Description of the last error when operating with the SMTP server. More... | |
Provides service to send messages through SMTP.
qtnetwork::MailSend::MailSend | ( | ) |
qtnetwork::MailSend::~MailSend | ( | ) |
bool qtnetwork::MailSend::connectToSmtpServer | ( | const SmtpAccount & | account | ) |
Try to connect to SMTP server using account
.
On failure, the error can be reported by errorString()
true
on success false
otherwise QString qtnetwork::MailSend::errorString | ( | ) | const |
Description of the last error when operating with the SMTP server.
QString() | If not any error occurred |
bool qtnetwork::MailSend::sendMessage | ( | const Message & | msg | ) |
Try to send message msg
.
On failure, the error can be reported by errorString()
true
on success false
otherwise void qtnetwork::MailSend::setTimeout | ( | int | msecs | ) |
int qtnetwork::MailSend::timeout | ( | ) | const |
Maximum waiting delay when operating with the SMTP server.
The time out is 30
seconds by default