Base mail socket.  
 More...
#include <BaseMailConnect.h>
Base mail socket. 
BaseMailConnect class is the base class for mail message components 
 
◆ BaseMailConnect()
  
  
      
        
          | sptk::BaseMailConnect::BaseMailConnect  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
default   | 
  
 
 
◆ ~BaseMailConnect()
  
  
      
        
          | virtual sptk::BaseMailConnect::~BaseMailConnect  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
virtualdefault   | 
  
 
 
◆ attachments() [1/2]
  
  
      
        
          | String sptk::BaseMailConnect::attachments  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlinenoexcept   | 
  
 
Method attachments() returns the current semicolon-separated list of attachments of e-mail message. Example: "readme.txt;readme.doc". 
- Returns
 - current message list of attachments 
 
 
 
◆ attachments() [2/2]
  
  
      
        
          | void sptk::BaseMailConnect::attachments  | 
          ( | 
          const String &  | 
          attachments | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Method attachments() sets the current semicolon-separated list of attachments of e-mail message. Example: "readme.txt;readme.doc". 
- Parameters
 - 
  
    | attachments | current message list of attachments  | 
  
   
 
 
◆ bcc() [1/2]
  
  
      
        
          | String sptk::BaseMailConnect::bcc  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlinenoexcept   | 
  
 
Method bcc() returns the current value of 'BCC:' field of e-mail message. 
- Returns
 - a list of e-mail addresses. See method to() description for format 
 
 
 
◆ bcc() [2/2]
  
  
      
        
          | void sptk::BaseMailConnect::bcc  | 
          ( | 
          const String &  | 
          addr | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Method bcc() sets the current value of 'BCC:' field of e-mail message. 
- Parameters
 - 
  
    | addr | should be a semicolon-separated list of one or more e-mail addresses in format: Real sender name <sender@host.net>. The example: John Doe <johnd@unknown.org>  | 
  
   
 
 
◆ body() [1/2]
  
  
      
        
          | String sptk::BaseMailConnect::body  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlinenoexcept   | 
  
 
Method subject() returns the current plain text part of e-mail message. 
- Returns
 - current message plain-text part 
 
 
 
◆ body() [2/2]
  
  
      
        
          | void sptk::BaseMailConnect::body  | 
          ( | 
          const String &  | 
          body,  | 
         
        
           | 
           | 
          bool  | 
          smtp  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
inline   | 
  
 
Sets the current plain text part of e-mail message. 
- Parameters
 - 
  
    | body | Message body  | 
    | smtp | Do we need special pre-processing for SMTP?  | 
  
   
 
 
◆ cc() [1/2]
  
  
      
        
          | String sptk::BaseMailConnect::cc  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlinenoexcept   | 
  
 
Method cc() returns the current value of 'CC:' field of e-mail message 
- Returns
 - a list of e-mail addresses. See method to() description for format 
 
 
 
◆ cc() [2/2]
  
  
      
        
          | void sptk::BaseMailConnect::cc  | 
          ( | 
          const String &  | 
          addr | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Method cc() sets the current value of 'CC:' field of e-mail message. 
- Parameters
 - 
  
    | addr | should be a semicolon-separated list of one or more e-mail addresses in format: Real sender name <sender@host.net>. The example: John Doe <johnd@unknown.org>  | 
  
   
 
 
◆ from() [1/2]
  
  
      
        
          | String sptk::BaseMailConnect::from  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlinenoexcept   | 
  
 
Method from() returns the current value of 'FROM:' field of e-mail message. 
- Returns
 - a single e-mail address. 
 
 
 
◆ from() [2/2]
  
  
      
        
          | void sptk::BaseMailConnect::from  | 
          ( | 
          const String &  | 
          addr | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Method from() sets the current value of 'FROM:' field of e-mail message. 
- Parameters
 - 
  
    | addr | should be an e-mail address in format: Real sender name <sender@host.net>. The example: John Doe <johnd@unknown.org>  | 
  
   
 
 
◆ messageBuffer()
  
  
      
        
          | const Buffer & sptk::BaseMailConnect::messageBuffer  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlinenoexcept   | 
  
 
Method messageBuffer() returns the reference to the internal current message text completely prepared for sending, as described in RFC-822 message format. It only makes sense to use it after call to sendMessage(). 
- Returns
 - reference to current message text 
 
 
 
◆ mimeFile()
  
  
      
        
          | static void sptk::BaseMailConnect::mimeFile  | 
          ( | 
          const String &  | 
          fileName,  | 
         
        
           | 
           | 
          const String &  | 
          fileAlias,  | 
         
        
           | 
           | 
          std::stringstream &  | 
          message  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
staticprotected   | 
  
 
Encoding the message into internal message buffer 
 
 
◆ mimeMessage()
      
        
          | void sptk::BaseMailConnect::mimeMessage  | 
          ( | 
          Buffer &  | 
          buffer | ) | 
           | 
        
      
 
Method mimeMessage() encodes the message components into RFC-822 message format. 
- Parameters
 - 
  
    | buffer | A buffer to put the encoded RFC-822 format message  | 
  
   
 
 
◆ sendMessage()
  
  
      
        
          | virtual void sptk::BaseMailConnect::sendMessage  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
pure virtual   | 
  
 
Method sendMessage() builds an RFC-822 format message out of message parameters, and sends it. Should be implemented in derived classes. 
Implemented in sptk::SmtpConnect.
 
 
◆ subject() [1/2]
  
  
      
        
          | String sptk::BaseMailConnect::subject  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlinenoexcept   | 
  
 
Method subject() returns the current value of 'SUBJECT:' field of e-mail message. 
- Returns
 - current message subject 
 
 
 
◆ subject() [2/2]
  
  
      
        
          | void sptk::BaseMailConnect::subject  | 
          ( | 
          const String &  | 
          subj | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Method subject() sets the current value of 'BCC:' field of e-mail message. 
- Parameters
 - 
  
  
 
 
 
◆ to() [1/2]
  
  
      
        
          | String sptk::BaseMailConnect::to  | 
          ( | 
           | ) | 
           const | 
         
       
   | 
  
inlinenoexcept   | 
  
 
Method to() returns the current value of 'TO:' field of e-mail message 
 
 
◆ to() [2/2]
  
  
      
        
          | void sptk::BaseMailConnect::to  | 
          ( | 
          const String &  | 
          addr | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Method from() sets the current value of 'TO:' field of e-mail message. 
- Parameters
 - 
  
    | addr | should be a semicolon-separated list of one or more e-mail addresses in format: Real sender name <sender@host.net>. The example: John Doe <johnd@unknown.org>  | 
  
   
 
 
The documentation for this class was generated from the following file: