![]() |
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
|
Fetches emails from user's email account. More...


Public Member Functions | |
| def | __init__ |
| Constructor. More... | |
| def | receiveEmailSrvCallback |
| The callback to receive specified mails from users email account. More... | |
Private Member Functions | |
| def | _connectImap |
| Create an IMAP connection to the server. More... | |
| def | _fetchEmail |
| Fetch specified email's data. More... | |
| def | _initializePath |
| Create a temporary path for the user emails. More... | |
| def | _selectEmails |
| Fetch the emails that match the requests criteria. More... | |
Fetches emails from user's email account.
Definition at line 46 of file email_receiver.py.
| def rapp_email.email_receiver.EmailReceiver.__init__ | ( | self | ) |
Constructor.
Definition at line 49 of file email_receiver.py.
|
private |
Create an IMAP connection to the server.
Initiates an IMAP connection according to the user's email and logins to the server using user's credentials
| [string] The user's email | |
| password | [string] The user's password |
| server | [string] The email server |
| port | [string] The email server's port |
Definition at line 264 of file email_receiver.py.
|
private |
Fetch specified email's data.
| imap | [imaplib::IMAP4_SSL] The connection |
| emailID | [int] The emails UID |
| receivePath | [string] The absolute path where the contents of the email should be written. |
| emailCounter | [int] The number of emails processed |
return mailMsg [rapp_platform_ros_communications::MailMsg] The mail msg to be appended in the service response
Definition at line 113 of file email_receiver.py.
|
private |
Create a temporary path for the user emails.
The path will be placed in ~/rapp_platform_files/emails/{username}{random_string}
| [string] The rapp user's email |
Definition at line 188 of file email_receiver.py.
|
private |
Fetch the emails that match the requests criteria.
req [rapp_platform_ros_communications::Email::ReceiveEmailSrvRequest] The receive email request
imaplib.IMAP4.error General imaplib error
Definition at line 215 of file email_receiver.py.
| def rapp_email.email_receiver.EmailReceiver.receiveEmailSrvCallback | ( | self, | |
| req | |||
| ) |
The callback to receive specified mails from users email account.
req [rapp_platform_ros_communications::Email::ReceiveEmailSrvRequest] The receive email request
res [rapp_platform_ros_communications::Email::ReceiveEmailSrvResponse] The receive email response
Definition at line 59 of file email_receiver.py.