QMail Class Reference

List of all members.


Detailed Description

Class to send email warnings from DAQ.

Author:
L. Kogler This class should be used to send emails from Apollo. It invokes the external unix "mail" program, which must be installed and configured on your system for this to work.
Please note: If you want to include quotations (") or other special characters in your message, they must be DOUBLE ESCAPED!

(This means you use \\" instead of \")

Public Member Functions

 QMail ()
 default constructor
 QMail (const QMail &orig)
 copy constructor
 QMail (std::string Recipient, std::string Subject, std::string Message)
 constructor
virtual ~QMail ()
 destructor
int Send ()
 Send the mail.
void SetSubject (std::string Subject)
 Set subject.
void SetMessage (std::string Message)
 Set message.
void AppendToMessage (std::string Text)
 Append to message.
int AddRecipient (std::string Recipient)
 Add a recipient.

Private Attributes

std::vector< std::string > fRecipients
 List of recipients.
std::string fSubject
 Subject of email.
std::string fMessage
 Body of email.


Constructor & Destructor Documentation

QMail::QMail ( const QMail orig  ) 

copy constructor

Parameters:
orig original QMail

References fMessage, fRecipients, and fSubject.

QMail::QMail ( std::string  Recipient,
std::string  Subject,
std::string  Message 
)

constructor

Parameters:
Recipient Address of recipient
Subject Subject of mail
Message Body of mail


Member Function Documentation

int QMail::Send (  ) 

Send the mail.

Returns:
Returns status code

References fMessage, fRecipients, and fSubject.

Referenced by MSimpleDAQCheck::Do(), MSimpleDAQCheck::Done(), and MPulserCheck::NotifyFailure().

void QMail::SetSubject ( std::string  Subject  )  [inline]

Set subject.

Parameters:
Subject Subject of email

References fSubject.

Referenced by MPulserCheck::NotifyFailure().

void QMail::SetMessage ( std::string  Message  )  [inline]

Set message.

Parameters:
Message Body of email

References fMessage.

Referenced by MPulserCheck::NotifyFailure().

void QMail::AppendToMessage ( std::string  Text  )  [inline]

Append to message.

Parameters:
Text Text to add to email message

References fMessage.

int QMail::AddRecipient ( std::string  Recipient  ) 

Add a recipient.

Parameters:
Recipient address of recipient to add
Returns:
Returns current number of recipients

Referenced by MSimpleDAQCheck::Do(), MSimpleDAQCheck::Done(), and MPulserCheck::NotifyFailure().


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

Generated on Tue Nov 16 10:50:07 2010 for CUORE Software by  doxygen 1.5.6