Skip to main content

This packages crates a simple way to work with, emails, send, read and download attachments

Project description

Mail Activitiesal

This Python package contains Mail class to work with emails, for more information about how to develop your RPA projects with python check https://automatehub.es/

Mail class

The Mail class represents a mail account and provides methods for sending and fetching emails.

Arguments

  • email: The email address of the mail account.
  • password: The password of the mail account.
  • smtp_server: The SMTP server of the mail account.
  • smtp_port: The SMTP port of the mail account.
  • imap_server: The IMAP server of the mail account.
  • imap_port: The IMAP port of the mail account.

Attributes

  • username: The username of the mail account.
  • password: The password of the mail account.
  • smtp_server: The SMTP server of the mail account.
  • smtp_port: The SMTP port of the mail account.
  • imap_server: The IMAP server of the mail account.
  • imap_port: The IMAP port of the mail account.

Methods

send(send_to, subject, text=None, html=None, files=None)

The send method is used to send an email.

Arguments

  • send_to: The email address to send the email to.
  • subject: The subject of the email.
  • text (optional): The text content of the email.
  • html (optional): The HTML content of the email.
  • files (optional): A list of files to attach to the email.

fetch(folder, Query)

The fetch method is used to fetch a list of emails from the mail box.

Arguments

  • folder: The folder to fetch emails from.
  • Query: A query object used to filter the emails. More information about the Query object can be found here.

download_attachments

This function is used to download attachments from a mail message.

Arguments:

  • mail: A MailMessage object representing the mail from which attachments need to be downloaded.

  • download_folder: The folder where the attachments will be downloaded to.

  • extension: (Optional) The extension of the attachments to be downloaded. If specified, only attachments with this extension will be downloaded. If not specified, all attachments will be downloaded.

More information

For more information about the Mail class and the Query object, please refer to the IMAP Tools documentation.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ibott-mail-1.0.6.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

ibott_mail-1.0.6-py3-none-any.whl (12.1 kB view details)

Uploaded Python 3

File details

Details for the file ibott-mail-1.0.6.tar.gz.

File metadata

  • Download URL: ibott-mail-1.0.6.tar.gz
  • Upload date:
  • Size: 8.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for ibott-mail-1.0.6.tar.gz
Algorithm Hash digest
SHA256 08a55af590c9c4d120ef24d7b35e5c6debc6b6b900ea0fd7183401fb2f842f1b
MD5 5a605149a0ba01c70de4af249ab4ce72
BLAKE2b-256 dc9abac5bf090c5a6cfbf9b249a0dd08739ffed5f476035af8e102414d3da8bc

See more details on using hashes here.

File details

Details for the file ibott_mail-1.0.6-py3-none-any.whl.

File metadata

  • Download URL: ibott_mail-1.0.6-py3-none-any.whl
  • Upload date:
  • Size: 12.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for ibott_mail-1.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 75f297fad163d9dd79c4f90eac354cc6b9c6861556d90e89bfa19fd0134d4f38
MD5 035f19885612c7a07445d714f4d1e561
BLAKE2b-256 436221d366ab18366d0efad469d805179d3644015deed3e531619fa479d1afe8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page