Skip to content

Latest commit

 

History

History
56 lines (46 loc) · 2.12 KB

README.md

File metadata and controls

56 lines (46 loc) · 2.12 KB

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 py-send-e-mail

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 = '[email protected]'
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