Skip to main content

A python email sender library

Project description

Emaileasily is a python package that simplifies the process of sending emails.

Installation

pip install emaileasily

Usage

>>> from emaileasily import email_to, email_subject, email_content, email_send

# Accepts more than one email address eg email_to('example.gmail.com', 'example5@gmail.com').
>>> email_to('example.gmail.com')
'example.gmail.com'
>>> email_subject('Python Email')
'Python Email'
>>> email_content('This is an example of sending emails with emaileasily')
# email_send() takes sender address and password as key arguments.
# The functions also takes email host and port as optional arguments.
# Default host="smtp.gmail.com" and port=465
>>> email_send('sender@gmail.com', 'password')
Email successfully sent.

Add email bcc and cc

>>> from emaileasily import email_bcc, email_cc

# Accepts more than one email address.
>>> email_bcc('example2@gmail.com')
>>> email_cc('example3@gmail.com')

Send html email

>>> from emaileasily import email_html
>>> email_html(
    """
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
    </head>
    <body>
    <h3>Message</h3>
    <p> Hello this is a html send message.</p>
    <a href='#'>Click here</a>
    </body>
    </html>
    """
    )

Attach Documents

>>> from emaileasily import email_attach_document

# Call the function after email_content
# The functions gives you the option to select documents for attachment.
>>> email_attach_document()

View all sent emails

>>> from emaileasily import emails_sent

# List all sent emails.
# The emails can be viewed manually by opening the directory file emails.csv.
>>> emails_sent() 

                  Date                 To              Cc             Bcc           Subject                                            Content                 Files
04-03-2022 Time: 17:58 receiver@gmail.com ccopy@gmail.com bcopy@gmail.com Read Inbox Emails Hello,You can simply read inbox emails using th...          ['blog.JPG']
04-03-2022 Time: 17:58 receiver@gmail.com ccopy@gmail.com bcopy@gmail.com Read Inbox Emails Hello,You can simply read inbox emails using th... ['assignment 1.docx']
04-03-2022 Time: 17:58 receiver@gmail.com ccopy@gmail.com bcopy@gmail.com Read Inbox Emails Hello,You can simply read inbox emails using th...                    []
04-03-2022 Time: 17:58 receiver@gmail.com ccopy@gmail.com bcopy@gmail.com Read Inbox Emails Hello,You can simply read inbox emails using th...                    []
04-03-2022 Time: 17:58 receiver@gmail.com ccopy@gmail.com bcopy@gmail.com Read Inbox Emails Hello,You can simply read inbox emails using th...                    []
04-03-2022 Time: 17:58 receiver@gmail.com ccopy@gmail.com bcopy@gmail.com Read Inbox Emails Hello,You can simply read inbox emails using th...                    []

View the last sent email

>>> from emaileasily import get_last_sent_email
>>> get_last_sent_email()

                  Date                 To              Cc             Bcc           Subject                                            Content Files
04-03-2022 Time: 17:59 receiver@gmail.com ccopy@gmail.com bcopy@gmail.com Read Inbox Emails Hello,You can simply read inbox emails using th...    []

View the last five sent emails

>>> from emaileasily import get_last_five_sent_emails
>>> get_last_five_sent_emails()

Read Inbox Emails

>>> from emaileasily import read_inbox_emails
>>> read_inbox_emails(email_address, email_password, number_of_emails_to read)

 _____  __  __     _     ___  _      _____     _     ____   ___  _     __   __
| ____||  \/  |   / \   |_ _|| |    | ____|   / \   / ___| |_ _|| |    \ \ / /
|  _|  | |\/| |  / _ \   | | | |    |  _|    / _ \  \___ \  | | | |     \ V / 
| |___ | |  | | / ___ \  | | | |___ | |___  / ___ \  ___) | | | | |___   | |  
|_____||_|  |_|/_/   \_\|___||_____||_____|/_/   \_\|____/ |___||_____|  |_|  
                                                                              

Subject:  Read Inbox Emails
From:  nzulaerastus@gmail.com

Hello,

You can simply read inbox emails using the emaileasily function read_inbox_emails and pass the arguments
email address, password and the number of emails to read.

Kind regards,
Erastus Nzula.
    
    

______________________________________________________________________________________________________________________________________________________

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

emaileasily-0.0.6.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

emaileasily-0.0.6-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file emaileasily-0.0.6.tar.gz.

File metadata

  • Download URL: emaileasily-0.0.6.tar.gz
  • Upload date:
  • Size: 5.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for emaileasily-0.0.6.tar.gz
Algorithm Hash digest
SHA256 2a443278886d61f0cbc07ff784c232f63593b1054a79391934432bfb435c2e0a
MD5 c57ccadd0c74e80f876400a0643305a1
BLAKE2b-256 cb5fb79315709b284a7201921dc67c9b4046605ea5b62fbd14c288b33d72d055

See more details on using hashes here.

File details

Details for the file emaileasily-0.0.6-py3-none-any.whl.

File metadata

  • Download URL: emaileasily-0.0.6-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.7 tqdm/4.62.3 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.10.2

File hashes

Hashes for emaileasily-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 91d39e36b29892f8815ab547ff883b32a099604fe5070e5b2d9e66b9773614b3
MD5 e85d38858c67ecd4d66d2384ab71bdcc
BLAKE2b-256 b400575185779f3d8814d11ca0919f476b3eae8401c71811d5612d8a7dabd4f5

See more details on using hashes here.

Supported by

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