Giter VIP home page Giter VIP logo

simplesendmail's Introduction

Author: Jervis Muindi
Date: October 2013

Introduction

This is a simple python program that aims to provide a simpler interface to sendmail for sending textual emails.

It is pretty handy for sending emails to your self and it is primarily designed to run on UNIX systems that have the sendmail utility installed.

The primary motivation came from finding the sendmail interface too arcane to send just a simple email. I felt overwhelemd by the sheer number of options which are exposed to the user. This script hides all that complexity and presents a simple, human friendly interface.

Dependency

###Argparse: This is used to do argument processing so the argparse module should be install. This module should be standard on Python 2.7 and later.

If you are on an older version of python, you can still install argparse through the PIP Python Package manager. From your terminal execute:

$ pip install argparse

How to Run

Details on running the program are described below:

usage: ssm.py [-h] --source SOURCE --destination DESTINATION [DESTINATION ...]
              [--subject SUBJECT] [--message MESSAGE] [--file FILE]
              [--sendmail-binary SENDMAIL_BINARY]

Simpler Interface to send mail

optional arguments:
  -h, --help            show this help message and exit
  --source SOURCE       Source of email
  --destination DESTINATION [DESTINATION ...]
                        Space separated list of destination email addresses to
                        send email to.
  --subject SUBJECT     Subject of the message.
  --message MESSAGE     Main Body of the message.
  --file FILE           Read specified text file and use that for the body of
                        the message.
  --sendmail-binary SENDMAIL_BINARY
                        Use specified copy of sendmail binary. Defaults to
                        /usr/sbin/sendmail.

Here is an example command:

$ python ssm.py [email protected] \
                --destination [email protected] [email protected] \
                --subject 'Hello' \
                --message 'Hello World'

simplesendmail's People

Contributors

jervisfm avatar

Watchers

 avatar  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.