Skip to main content

Sendmail client. send mail via stmp server.

Project description


Sendmail client. send mail via stmp server.


pip install python-sendmail

Installed Command Lines

  • pysendmail


test@test ~ % pysendmail --help
Usage: pysendmail [OPTIONS] [CONTENT]

  Send mail.

  -f, --from-address TEXT  Mail sender, e.g. Name <> or
  -t, --to-address TEXT    Mail recipients, e.g. Name <> or
  -s, --subject TEXT       Mail subject
  -a, --attach TEXT        Mail attachments, allow multiple use.
  --html                   Mail content is HTML format.
  -e, --encoding TEXT      Encoding of the mail content input.
  -c, --charset TEXT       Encoding of the mail content output.
  -h, --host TEXT          Mail server address, default to
  -p, --port INTEGER       Mail server port, default to 25. If you are using
                           an ssl server, mostly the port should be 465.
  --ssl                    Mail server using ssl encryption.
  -u, --user TEXT          Mail server login account. Empty user means don't
                           use login.
  -P, --password TEXT      Mail server login password. Empty password means
                           don't use login.
  --verify                 Verify ssl certificate.
  --help                   Show this message and exit.


Send mail with auth, without attachment.

pysendmail -h -p 465 --ssl -u -P senderPassword -f 'SENDER <>' -t -s 'just a test mail' 'just a test mail'

Send mail with attachment, without auth

  • Mail
  • Mail recipient:
  • Subject:just a test mail
  • Content:just a test mail
  • Mail Server Address:
  • Mail Server Port:25
  • Use ssl: No
  • Account: None
  • Password: None
  • Attachment: /path/to/attachment.pdf
pysendmail -f -t -s 'just a test mail' -a /path/to/attachment.pdf 'just a test mail'



  • Doc update.


  • Fix ssl context problem.
  • Add attach filename support.


  • Add verify option. By default python-sendmail will ignore the ssl verify.


  • Change help information to english.
  • Use new style to release.


  • Old style release.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python-sendmail-0.3.4.tar.gz (6.2 kB view hashes)

Uploaded Source

Built Distribution

python_sendmail-0.3.4-py3-none-any.whl (6.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page