Skip to main content

Convert encoding of given file from one encoding to another.

Project description

Pure python sendmail client.

Install

pip install python-sendmail

Help

E:\python-sendmail>python sendmail.py --help
Usage: sendmail.py [OPTIONS] [CONTENT]

Send an email via command line.

Note:

If CONTENT is not provided in command line, will read it from STDIN.

Options:
-f, --from-address TEXT  Sender's mail address, e.g. Sender Name
                        <sender@exmaple.com> or sender@example.com
                        [required]
-t, --to-address TEXT    Recipient's mail address, e.g. Recipient Name
                        <recipient@exmaple.com> or recipient@example.com
                        [required]
-s, --subject TEXT       Mail subject
-a, --attach TEXT        Attachment file path, can use multiple times.
--html                   The content is html format
-e, --encoding TEXT      Encoding of the content, defaults to utf-8
-h, --host TEXT          Email server address
-p, --port INTEGER       Email server port
--ssl                    Email server use ssl
-u, --user TEXT          Login user
-P, --password TEXT      Login password
--help                   Show this message and exit.

Usage

SENDER(sender@exmaple.com) send an email to recipient@exmaple.com, mail subject is ‘just a test mail’ and mail content is ‘just a test mail’.

sendmail -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'

SENDER(sender@exmaple.com) send an email to recipient@exmaple.com, mail subject is ‘just a test mail’, mail content is ‘just a test mail’, and with an attachment file named ‘attachment.pdf’

sendmail -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' -a /path/to/attachment.pdf 'just a test mail'

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.1.0.tar.gz (3.1 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: python-sendmail-0.1.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.7

File hashes

Hashes for python-sendmail-0.1.0.tar.gz
Algorithm Hash digest
SHA256 820ae803d966a1a0a26c47bd335200a4c637c58532b4e5af656c65ee2b8898fa
MD5 cf6614039be3f9b75a0cfd47eed6cea6
BLAKE2b-256 3195b24835d1577b28cf1d879a3b4af8d34e750101c83af638bd8df3a3ccbd75

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