An API to send emails through python3's smtplib module.

Related tags

Email emailer-py
Overview

Emailer

An API to send emails through python3's smtplib module. Just configure your SMTP server credentials and you are ready to send a lot of emails through API, designed to be used as a newsletter service.

This project is under development, you can face bugs and you shouldn't use it in production.

Features

  • Send emails via HTTP POST request
  • Blacklist & Whitelist email addresses
  • Only allowed IP can post requests

Roadmap

  • Multiple email support
  • Email verification via OTP
  • SMS Support using AWS SNS

If you have any other suggestions, feel free to open a Issue or Pull Request

Tech Stack

Client: Swagger, Bootstrap

Server: Python, FastAPI, smtplib

Installation

This project is built with python-3.9 and fastapi

  • Installing pre-requisites
apt-get install git python3 python3-pip
  • Cloning Project
git clone https://github.com/viperadnan-git/emailer-py
cd emailer-py
  • Installing dependencies via pip
pip install -r requirements.txt

Configuration

All configuration are inside a single file config.yml

server:
    allowed_hosts: ["127.0.0.1", "103.201.127.144", "*"]

smtp:
    username: [email protected]
    password: TheStr@ngPassword
    host: smtp.mail.yahoo.com
    port: 587

options:
    whitelist: ["*@gmail.com"]
    blacklist: ["*-*@gmail.com"]

Deployment

To deploy this project via uvicorn (ASGI server implementation) run

uvicorn main.app:app

By default this will listen to localhost and port 8000. To listen to desired host nad port pass the --host and --port flags accordingly.

If you want to listen on all host and HTTP request (with port 80)

uvicorn main.app:app --host 0.0.0.0 --port 80

Usage Example

: /email/send" headersList = { "Content-Type": "application/json" } payload = json.dumps({ "email":"[email protected]", "body": "Hello from emailer-py" }) response = requests.request("POST", reqUrl, data=payload, headers=headersList) print(response.text)">
import requests

reqUrl = "http://
     
      :
      
       /email/send"
      
     

headersList = {
 "Content-Type": "application/json" 
}

payload = json.dumps({
    "email":"[email protected]",
    "body": "Hello from emailer-py"
})

response = requests.request("POST", reqUrl, data=payload,  headers=headersList)

print(response.text)
  • You can use a for loop if you have multiple emails as a list.
You might also like...
A python program capable of accessing passwords associated with emails through leaked databases.
A python program capable of accessing passwords associated with emails through leaked databases.

passfind A python program capable of accessing passwords associated with emails through leaked databases. A python program capable of accessing passwo

Will iterate through a list of emails on an attached csv file and email all of them a message of your choice

Email_Bot Will iterate through a list of emails on an attached csv file and email all of them a message of your choice. Before using, make sure you al

A simple free API that allows you to extract abuse emails from IPs.

Abuse-Email-API A simple free API that allows you to extract abuse emails from IPs. also isnt worth 500 dollars :) Requirements A Debian based OS The

A functional demo of the O365 Module to send an email on an authenticated, tokenized account.
A functional demo of the O365 Module to send an email on an authenticated, tokenized account.

O365_email A functional demo of the O365 Module to send an email on an authenticated, tokenized account. Prep Create an app in Azure Developer's porta

A script based on an article I wrote on decluttering emails.

Decluttering_Email A script based on an article I wrote on decluttering emails. What does this program do? This program is a python script that sends

Mailrise is an SMTP server that converts the emails it receives into Apprise notifications
Mailrise is an SMTP server that converts the emails it receives into Apprise notifications

Mailrise is an SMTP server that converts the emails it receives into Apprise notifications. The intended use case is as an email relay for a home lab or network. By accepting ordinary email, Mailrise enables Linux servers, Internet of Things devices, surveillance systems, and outdated software to gain access to the full suite of 60+ notification services supported by Apprise, from Matrix to Nextcloud to your desktop or mobile device.

Heimdall watchtower automatically sends you emails to notify you of the latest progress of your deep learning programs.
Heimdall watchtower automatically sends you emails to notify you of the latest progress of your deep learning programs.

This software automatically sends you emails to notify you of the latest progress of your deep learning programs.

Use Django admin to manage drip campaign emails using querysets on Django's User model.
Use Django admin to manage drip campaign emails using querysets on Django's User model.

Django Drip Drip campaigns are pre-written sets of emails sent to customers or prospects over time. Django Drips lets you use the admin to manage drip

PGP encrypted / multipart templated emails for Django

Created by Stephen McDonald Introduction django-email-extras is a Django reusable app providing the ability to send PGP encrypted and multipart emails

Releases(0.1.0)
Owner
Adnan Ahmad
Currently learning Python, Bash, NodeJs, HTML, CSS and JavaScript. Remember ! Everyone starts with Zero.
Adnan Ahmad
Send Emails through the terminal , fast and secure

Send Emails through the terminal , fast and secure

null 11 Aug 7, 2022
Django module to easily send templated emails using django templates, or using a transactional mail provider (mailchimp, silverpop, etc.)

Django-Templated-Email Info: A Django oriented templated email sending class Author: Bradley Whittington (http://github.com/bradwhittington, http://tw

Vinta Software 659 Dec 27, 2022
Churn Emails Inbox - Churn Emails Inbox Using Python

Churn Emails Inbox In this project, I have used the Python programming langauge

null 2 Nov 13, 2022
Envia-emails - A Python Program that creates emails

Envia-emails Os emails é algo muito importante e usado. Pensando nisso, eu criei

José Rodolfo 2 Mar 5, 2022
Bulk send personalized emails using a .csv file and Gmail API (via EZGmail)

GSender Bulk send personalized emails using a .csv file and Gmail API (via EZGmail). Installation Install requirements.txt. Follow the EZGmail Install

null 1 Nov 23, 2021
Python Email Sender (PES) is a program made with Python using smtplib, socket and tkinter.

Python Email Sender (PES) is a program made with Python using smtplib, socket and tkinter. This program was made for sender email to be a gmail account because that's what I used when testing it out, to make it work for a gmail account turn off secure app and then put in your email and password into the right variables and the program should be good to run!

Zacky2613 1 Aug 26, 2022
This is a bot that interacts with you over voice and sends mail.Uses speech_recognition,pyttsx3 and smtplib

AutoMail This is a bot that interacts with you over voice and sends mail Before you run the bot , go to mail.py and put your respective email address

Aditya Subrahmanya Bhat 2 Nov 4, 2022
Convert emails without attachments to pdf and send as email

Email to PDF to email This script will check an imap folder for unread emails. Any unread email that does not have an attachment will be converted to

Robert Luke 21 Nov 22, 2022
A spammer to send mass emails to teachers. (Education Purposes only!)

Securly-Extension-Spammer A spammer to send mass emails to teachers. (Education Purposes only!) Setup Just go a securly blocked page(You can do this b

null 3 Jan 25, 2022
Pysces (read: Pisces) is a program to help you send emails with an user-customizable time-based scheduling.

Pysces (Python Scheduled-Custom-Email-Sender) Pysces (read: Pisces) is a program to help you send emails with an user-customizable time-based email se

Peter 1 Jun 16, 2022