Coder Social home page Coder Social logo

pysmtp's Introduction

pysmtp

An easy way to send email from the command line on Mac OS X

pysmtp lets you send email from the command line (or another script) with minimal hassle. It uses the Mac OS X keychain to retrieve your password (no more storing passwords in plain text!). You can even send attachments. pysmtp has no dependencies (other than Python and keychain.py, which is included), so there's nothing to compile, install, or configure.

Setup

To get started, you'll need a keychain item that corresponds to the SMTP server you want to use. Open Keychain Access (in /Applications/Utilities) and go to File > New Password Item... Set "Keychain Item Name", to your SMTP server; for example "smtp.gmail.com". In the "Account Name" box, enter your email address, such as "[email protected]". Finally, enter your password and save the item.

Usage

Usage is simple -- there's only one required argument (although you'll probably need more to do anything useful). The following will send an email to [email protected] from [email protected]:

python pysmtp.py [email protected]

Add a 2nd email address to send to someone other than yourself, and use options to set the subject, message, file attachment, etc. For a complete list of options, run:

python pysmtp.py --help

Note that as pysmtp depends on Mac OS X's keychain, it won't work on any other platform. I'm sure someone else can solve this and I'd be happy to merge in any such enhancements.

License

Copyright 2010 Luke D Hagan

Do whatever you want. Feel free to copy, modify, redistribute, remix, etc. in whatever way you see fit.

Disclaimer

This software is provided 'AS IS' -- use at your own risk. It works fine for me, but I'm not to be held responsible for any damage, data loss, security breaches, public embarrassment, etc. that may result from your use of this software.

pysmtp's People

Stargazers

 avatar

Watchers

Luke Hagan avatar James Cloos 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.