Skip to main content

Easy Email sender Python package

Project description

Email_Sender

Email_Sender is Python Package For Sending Email Easily. This package is trying to help programmer save time adjusting code for sending email.

Installation

you should have python 3

$ pip3 install email_sender

Usage

email_sender have one base class Mail that used to send email using smtp connection.

Mail

Parameters

  • email - Required - Email of sender. once you initiate it, it can be used for sending emails
  • password - Required if envPath is None - Password is required if you don't specify the .env path - in Most case programmer don't wanna put password as string inside their code for that email_sender module use dotenv.
  • host - default to 'smtp.gmail.com'
  • port - default to 587
  • envPath - optional - envPath expect python pathlib.Path('.env file location').resolve()
  • envName - optional default to password - envName if the name of the password in the .env is another name.

Example

from email_sender.mail import Mail
from pathlib import Path
senderEmail = 'sender@gmail.com
receiverEmail = 'receiverEmail@gmail.com'
mail = Mail(senderEmail, envPath=Path('.env'), envName='cha')

message = '''\
Subject: Testing Emails 
This is testing email message 
'''
mail.send_email(receiverEmail, message)

Clone

if you want to clone and use the repo use the requirement.txt file

pip3 install -r requirements.txt 

About Developer

My Name is Temking Mengistu . I am Student at Adama Science and Technology University in field of Computer Science and Engineering. Follow me on

©chapimenge 2020

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

py-send-e-mail-0.1.tar.gz (3.3 kB view hashes)

Uploaded Source

Built Distribution

py_send_e_mail-0.1-py3-none-any.whl (7.6 kB view hashes)

Uploaded Python 3

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