FougTools  0.7.0dev-046fb6a
Handy tools for C++, Qt and OpenCascade
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
qtnetwork::MailSend Class Reference

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...
 

Detailed Description

Provides service to send messages through SMTP.

Constructor & Destructor Documentation

qtnetwork::MailSend::MailSend ( )
qtnetwork::MailSend::~MailSend ( )

Member Function Documentation

bool qtnetwork::MailSend::connectToSmtpServer ( const SmtpAccount account)

Try to connect to SMTP server using account.

On failure, the error can be reported by errorString()

Returns
true on success false otherwise
QString qtnetwork::MailSend::errorString ( ) const

Description of the last error when operating with the SMTP server.

Return values
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()

Returns
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

See also
setTimeout()

The documentation for this class was generated from the following files: