Definition at line 41 of file email_sender.py.
def rapp_email.email_sender.EmailSender.__init__ |
( |
|
self | ) |
|
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.SMTPException | Base SMTP exception class |
socket.error | Socket 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
-
IOError | General IO error |
EnvironmentError | General 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:
- /home/travis/rapp_temp/rapp-platform/rapp_email/src/rapp_email/email_sender.py