Skip to main content

Sendmail client. send mail via stmp server.

Project description

python-sendmail

Sendmail client. send mail via stmp server.

Install

pip install python-sendmail

Installed Command Lines

  • pysendmail

Help

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

  Send mail.

Options:
  -f, --from-address TEXT  Mail sender, e.g. Name <name@example.com> or
                           name@example.com.  [required]
  -t, --to-address TEXT    Mail recipients, e.g. Name <name@example.com> or
                           name@example.com.  [required]
  -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 127.0.0.1.
  -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 stmp.example.com -p 465 --ssl -u sender@example.com -P senderPassword -f 'SENDER <sender@exmaple.com>' -t recipient@exmaple.com -s 'just a test mail' 'just a test mail'

Send mail with attachment, without auth

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

Releases

v0.3.2

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

v0.3.1

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

v0.3.0

  • 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.2.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

python_sendmail-0.3.2-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file python-sendmail-0.3.2.tar.gz.

File metadata

  • Download URL: python-sendmail-0.3.2.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for python-sendmail-0.3.2.tar.gz
Algorithm Hash digest
SHA256 d539de6fecf6dad8caa19e7ac8f47e2ca473d4639b556208dcfbfc0ce0e9de4c
MD5 25b50ca8d4c7b4480c912ce74aacd77a
BLAKE2b-256 43f44265d7b077690a0073ec26aed94da278ba04e49c08ae5c8837da91cd7c7d

See more details on using hashes here.

File details

Details for the file python_sendmail-0.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for python_sendmail-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3986c7c2c14cfcb1b8f8f426998b6184f34c92318c692888f847add8ef39b928
MD5 a7fa138cd01d25fc250a9e0cf3864af6
BLAKE2b-256 cda933ce14af5536924f407f358b293cde964962bea9fb87b046ae955e9e7d17

See more details on using hashes here.

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