RAPP Platform  v0.6.0
RAPP Platform is a collection of ROS nodes and back-end processes that aim to deliver ready-to-use generic services to robots
 All Classes Namespaces Files Functions Variables Macros
rapp_email.email_sender.EmailSender Class Reference
Inheritance diagram for rapp_email.email_sender.EmailSender:
Collaboration diagram for rapp_email.email_sender.EmailSender:

Public Member Functions

def __init__
 
def sendEmailSrvCallback
 The callback to send specified mails from users email account. More...
 

Private Member Functions

def _connectAndSend
 Connect to the requested SMTP server and send email. More...
 
def _createEmailBody
 Creates the emails main body. More...
 
def _handleAttachment
 Add attachment to the email. More...
 

Detailed Description

Definition at line 41 of file email_sender.py.

Constructor & Destructor Documentation

def rapp_email.email_sender.EmailSender.__init__ (   self)

Definition at line 43 of file email_sender.py.

Member Function Documentation

def rapp_email.email_sender.EmailSender._connectAndSend (   self,
  userEmail,
  userPassword,
  recipients,
  server,
  port,
  msg 
)
private

Connect to the requested SMTP server and send email.

Parameters
userEmail[string] The sender's email
userPassword[string] The sender's password
recipients[list<string>] The recipients' emails
server[string] The SMTP server's address
port[string] The SMTP server's port
Exceptions
smtplib.SMTPExceptionBase SMTP exception class
socket.errorSocket class exception (connection problem)

Definition at line 100 of file email_sender.py.

def rapp_email.email_sender.EmailSender._createEmailBody (   self,
  recipients,
  userEmail,
  body,
  subject 
)
private

Creates the emails main body.

Parameters
recipients[list<string>] The recipients' emails
userEmail[string] The sender's email
subject[string] The email's subject
body[string] The email's body text
Returns
msg [MimeMultipart] The email's main body to be sent via SMTP

Definition at line 137 of file email_sender.py.

def rapp_email.email_sender.EmailSender._handleAttachment (   self,
  filename 
)
private

Add attachment to the email.

Parameters
filename[string] The absolute path of the requested file
Returns
attachment [mimeobject] The attachment format of the file to be appended to the email
Exceptions
IOErrorGeneral IO error
EnvironmentErrorGeneral IO error

Definition at line 158 of file email_sender.py.

def rapp_email.email_sender.EmailSender.sendEmailSrvCallback (   self,
  req 
)

The callback to send specified mails from users email account.

req [rapp_platform_ros_communications::Email::SendEmailSrvRequest] The send email request

res [rapp_platform_ros_communications::Email::SendEmailSrvResponse] The send email response

Definition at line 53 of file email_sender.py.


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