project_progress package¶
Submodules¶
project_progress.email_sending module¶
- project_progress.email_sending.send_email(email_info)[source]¶
Send an email using the given email information.
- Parameters:
email_info – A dictionary containing the following keys: - “text”: The email body (str) - “Subject”: The email subject (str) - “From”: The sender’s email address (str) - “To”: The recipient’s email address (str) - “send_email”: The email address used for authentication (str) - “send_pwd”: The password used for authentication (str) - “smtp_name” (optional): The SMTP server name (str). Default is “smtp.example.com”. - “smtp_port” (optional): The SMTP server port (int). Default is 587.
- Returns:
None
project_progress.file_attachment module¶
- project_progress.file_attachment.send_email_with_attachment(send_email, send_pwd, smtp_name, smtp_port, recv_email, subject, text, file_path)[source]¶
Send an email with an attachment using the given email information and attachment file.
- Parameters:
send_email – The sender’s email address (str)
send_pwd – The password used for authentication (str)
smtp_name – The SMTP server name (str)
smtp_port – The SMTP server port (int)
recv_email – The recipient’s email address (str)
subject – The email subject (str)
text – The email body (str)
file_path – The path to the file to be attached (str)
- Returns:
None
project_progress.reading_email_content module¶
- project_progress.reading_email_content.find_encoding_info(txt)[source]¶
Find encoding information for a given text.
- Parameters:
txt – The text to find encoding information for (str)
- Returns:
A tuple containing the decoded subject and the encoding (tuple)
- project_progress.reading_email_content.read_email_contents(imap, num_emails=5)[source]¶
Read the email contents from an IMAP mailbox.
- Parameters:
imap – An IMAP object connected to the mailbox (IMAP object)
num_emails – The number of email contents to read (int), default is 5
- Returns:
A list of email content information (list)
project_progress.reading_email_title module¶
- project_progress.reading_email_title.find_encoding_info(txt)[source]¶
Find encoding information for a given text.
- Parameters:
txt – The text to find encoding information for (str)
- Returns:
A tuple containing the decoded subject and the encoding (tuple)
- project_progress.reading_email_title.read_email_titles(imap, num_emails=5)[source]¶
Read the email titles from an IMAP mailbox.
- Parameters:
imap – An IMAP object connected to the mailbox (IMAP object)
num_emails – The number of email titles to read (int), default is 5
- Returns:
A list of email title information (list)
project_progress.send_notification module¶
project_progress.slack_bot module¶
Module contents¶
A package for working with email notifications and integrations.
This package provides functions for sending emails, attaching files, reading email titles and contents, sending notifications based on specific email criteria, and interacting with the Slack API through webhooks.