Skip to content

Python script for sending out customized emails to recipients listed in a CSV file

Notifications You must be signed in to change notification settings

RaphaelWimmer/csv_mailer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

csv_mailer.py

Send customized emails to recipients in a CSV file

(c) 2008 Raphael Wimmer [email protected]

This code is in the public domain - use it however you like

Take caution when sending out mass mailings using this script.

Do not use this script for spamming.

Features

  • fills an email template with data from a CSV list
  • short, clean and customizable
  • requires some customization for a specific task
  • double protection against mistakes
  • TLS and authentication for SMTP
  • UTF-8 - should work for all languages

How to use

  • adjust mail_template.txt
  • prepare CSV list (see example)
  • customize script so that it replaces placeholders in the template with data from the CSV file or other sources
  • send e-mails
    • do a dry-run first (DRY_RUN=1), no email will actually be sent
    • test in safe mode (DRY_RUN=0 and SAFE_MODE=1) - all emails will be sent to one specified address (ideally your own address).
    • if everything seems ok, disable SAFE_MODE and run the script again.

Ideally, you should do all your local modifications in separate git branches. Then you can pull updates to this script without clashes with your existing modifications.

Links

About

Python script for sending out customized emails to recipients listed in a CSV file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages