Skip to content

A command line tool for sending mail via SMTP and support Linux, Windows, MacOS, BSD etc.

Notifications You must be signed in to change notification settings

leopku/SendmailViaSMTP

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 

Repository files navigation

README

SendmailViaSMTP is an easy used command line kit for sending mail via smtp server which can use in multiple platforms like linux, BSD, Windows etc. Like msmtp but don't need compile and install in each machine. Just copy SendmailViaSMTP.py to any machine which had python installed. SendmailViaSMTP is distributed under the BSD license.

  • Accept data from pipe as email body.
  • Tls support. This means we support sending mail using gmail.
  • Multi recipient support.
  • Multi system supported, like Linux, BSD, Windows etc.
  • NEW: Attachments support(using -a/--attach option, see help message for more).
  • log support. use --log option for debugging.
  1. Git clone(recommend)
    $git clone https://github.com/leopku/SendmailViaSMTP.git
  2. Download
    1. Dowload last source code zip/tar.gz package from http://github.com/leopku/SendmailViaSMTP/archives/master
    2. Download last package uploading by developer from http://github.com/leopku/SendmailViaSMTP/downloads
  1. pipe mode [1]
    $echo "contents from pipe." | python SendmailViaSMTP.py --host="mail.domain.com" --from="myname@yourdomain.com" --to="friends1@domain1.com;friends2@domain.com" --user="myname@yourdomain.com" --password="p4word" --subject="mail title"
  2. file mode
    $python SendmailViaSMTP.py --host="mail.domain.com" --from="myname@yourdomain.com" --to="friends1@domain1.com;friends2@domain.com" --user="myname@yourdomain.com" --password="p4word" --subject="mail title" --file="/path/to/file"
  3. option mode
    $python SendmailViaSMTP.py --host="mail.domain.com" --from="myname@yourdomain.com" --to="friends1@domain1.com;friends2@domain.com" --user="myname@yourdomain.com" --password="p4word" --subject="mail title" --content="contents from option"

NOTE: The priority of three mode: pipe mode, file mode, option mode.

[1]pipe mode is very useful while working with nagios etc.

About

A command line tool for sending mail via SMTP and support Linux, Windows, MacOS, BSD etc.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages