Code Monkey home page Code Monkey logo

sendtmail's Introduction

sendtmail

Generates and sends emails based on a CSV template. Useful for Gmail and for sending customized attachments to each recipient.

DEPENDENCIES:

How to use:

  1. Create a CSV "workfile" containing all of your email details. Each row should contain header info (FROM, TO, CC, BCC, and SUBJECT). FROM is required, as is at least one of TO, CC, and BCC. SUBJECT is optional.
  2. BODY should be a path (absolute or relative to the location of the CSV workfile) to a template file that uses Jinja2 templating syntax (see http://jinja.pocoo.org/docs/templates/ for details). Each row can have a different value for BODY if you want.
  3. SUBJECT should just be a string in the CSV, though it can also use Jinja2 template syntax. (BODY can also be a string.)
  4. Fields beginning with ATTACHMENT should be paths (again, absolute or relative to the location of the CSV workfile) to attachment files.
  5. You also need to create a file containing the details of the account to which you want to connect. This file needs to have 3 lines, with the SMTP host and port on the first, the user account on the second, and the account password on the third.
  6. Run sendtmail to use. Use the -d [--debug] flag to run in debug mode and print out all of the emails without sending them.

The following templates are provided as examples:

  • Email account file: "[email protected]"
  • Email template: "sample_email_template"
  • Workfile: "sample_workfile.csv"

sendtmail's People

Contributors

natehardison avatar

Stargazers

 avatar  avatar  avatar  avatar

Forkers

aaronzhangl

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.