Giter Club home page Giter Club logo

massemailerwithcustomtemplate's Introduction

MassEmailer

A simple mass emailing script. Send an email to an unlimited amount of email addresses in separate emails.

Python 3.8
Dependencies: Standard Library

How To Use:

  1. Download MassEmailer.py to a folder
  2. Create a .txt file for your email body text
  3. Create another .txt file with your newline separated email list
  4. Open MassEmailer.py and change function parameters to your own
    • Your email address
    • Your email address password
    • Your email provider's server
    • Number of email addresses from your addresses text file you want to send to each run
    • Your email address text file name
    • Your email body text
    • Your email subject

Example Use:

  • Make a file called addresses.txt containing 5,000 email addresses
  • Make a file called email.txt that contains just the body of your email
  • Input all your personal parameters into MassEmailer.py
  • For gmail, set the "num_of_addresses" parameter to 100 (100 email/day gmail limit)
  • Schedule this script to run every 24 hours
  • When the script runs once there will be 4,900 email addresses left in addresses.txt, after the second run there will be 4,800 email addresses left in addresses.txt, etc

Example Code:

email_address_list = parse_email_addresses('addresses.txt', 100)
    
for email_address in email_address_list:
    email_message = create_message('Hello, this is the email subject', '[email protected]', email_address, body_text, attachments=['file_path1','file_path2', ...])
    send_email('[email protected]', 'password123', email_message)
    sleep(1)

Important Notes:

  • This program has you input how many of the email addresses from your email address .txt file you want to send to each run, this is due to email send limits like gmail's limiting to only sending 100 emails per day. Once the program sends to those email addresses, it deletes the used addresses from your .txt file only leaving the un-used addresses. Keep a copy of your original email list safe elsewhere or you will lose ALL of them once the program has sent an email to them.
  • For this to work with gmail, you must turn "less secure app access" ON in your gmail settings. Here is a guide: https://support.google.com/accounts/answer/6010255

massemailerwithcustomtemplate's People

Contributors

mmshivesh avatar trevtravtrev avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.