botanick.commands.subcommands package¶
Submodules¶
botanick.commands.subcommands.mail module¶
-
class
botanick.commands.subcommands.mail.
MailManager
(encryption_key)¶ Bases:
object
Manage the mail subcommand
-
openImapConnection
(decryptedPassword)¶ Open the IMAP connection
Parameters: decryptedPassword – the decrypted password Returns: the imap mail connection
-
classmethod
prepareReply
(mailSubject, mailFrom, mailTo, mailID)¶ Prepare the reply and return the message to send
Parameters: - mailSubject – the mail subject
- mailFrom – the from email address
- mailTo – the destination email address
- mailID – the email ID
Returns: the message to send
-
classmethod
readEmail
(mail, emailUID)¶ Read an email and return the message
Parameters: - mail – the imap mail instance
- emailUID – UID of the mail to read
Returns: the message
-
run
()¶ Main function of this mail manager
-
sendEmail
(msg, decryptedPassword)¶ Send the email
Parameters: - msg – the message to send
- decryptedPassword – the decrypted password
-
-
botanick.commands.subcommands.mail.
mail
(args)¶
botanick.commands.subcommands.webservice module¶
-
class
botanick.commands.subcommands.webservice.
MailList
(api=None, *args, **kwargs)¶ Bases:
flask_restplus.resource.Resource
-
classmethod
get
(domain)¶ Search emails for a specific domain name.
Parameters: domain – the domain name
-
methods
= ['GET']¶
-
classmethod
-
botanick.commands.subcommands.webservice.
showIndex
()¶ Return the index page content
-
botanick.commands.subcommands.webservice.
webservice
(args)¶