python-sendmail


Namepython-sendmail JSON
Version 0.3.4 PyPI version JSON
download
home_page
SummarySendmail client. send mail via stmp server.
upload_time2023-09-14 12:50:20
maintainerLi HengJie
docs_urlNone
authorLi HengJie
requires_python
licenseMIT
keywords python-sendmail pysendmail sendmail pysendeml sendeml mail
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # 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.

- Mail sender:sender@example.com
- Mail recipient: recipient@exmaple.com
- Subject:just a test mail
- Content:just a test mail
- Mail Server Address:stmp.example.com
- Mail Server Port:465
- Use ssl: yes
- Account: sender@example.com
- Password: senderPassword
- Attachment: None

```
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.4

- Doc update.

### v0.3.3

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

### 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.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "python-sendmail",
    "maintainer": "Li HengJie",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "lihengjie@zencore.cn",
    "keywords": "python-sendmail,pysendmail,sendmail,pysendeml,sendeml,mail",
    "author": "Li HengJie",
    "author_email": "lihengjie@zencore.cn",
    "download_url": "https://files.pythonhosted.org/packages/f1/70/676e1181f3577de611c3c747f15b777ce922c709d16bb21f58e8535efec4/python-sendmail-0.3.4.tar.gz",
    "platform": null,
    "description": "# python-sendmail\n\n\nSendmail client. send mail via stmp server.\n \n## Install\n\n```\npip install python-sendmail\n```\n    \n## Installed Command Lines\n\n- pysendmail\n\n## Help\n\n```\ntest@test ~ % pysendmail --help\nUsage: pysendmail [OPTIONS] [CONTENT]\n\n  Send mail.\n\nOptions:\n  -f, --from-address TEXT  Mail sender, e.g. Name <name@example.com> or\n                           name@example.com.  [required]\n  -t, --to-address TEXT    Mail recipients, e.g. Name <name@example.com> or\n                           name@example.com.  [required]\n  -s, --subject TEXT       Mail subject\n  -a, --attach TEXT        Mail attachments, allow multiple use.\n  --html                   Mail content is HTML format.\n  -e, --encoding TEXT      Encoding of the mail content input.\n  -c, --charset TEXT       Encoding of the mail content output.\n  -h, --host TEXT          Mail server address, default to 127.0.0.1.\n  -p, --port INTEGER       Mail server port, default to 25. If you are using\n                           an ssl server, mostly the port should be 465.\n  --ssl                    Mail server using ssl encryption.\n  -u, --user TEXT          Mail server login account. Empty user means don't\n                           use login.\n  -P, --password TEXT      Mail server login password. Empty password means\n                           don't use login.\n  --verify                 Verify ssl certificate.\n  --help                   Show this message and exit.\n\n```\n\n## \u4f7f\u7528\u6848\u4f8b\n\n\n### Send mail with auth, without attachment.\n\n- Mail sender\uff1asender@example.com\n- Mail recipient: recipient@exmaple.com\n- Subject\uff1ajust a test mail\n- Content\uff1ajust a test mail\n- Mail Server Address\uff1astmp.example.com\n- Mail Server Port\uff1a465\n- Use ssl: yes\n- Account: sender@example.com\n- Password: senderPassword\n- Attachment: None\n\n```\npysendmail -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'\n```\n\n\n### Send mail with attachment, without auth\n\n- Mail sender\uff1asender@example.com\n- Mail recipient: recipient@exmaple.com\n- Subject\uff1ajust a test mail\n- Content\uff1ajust a test mail\n- Mail Server Address\uff1a127.0.0.1\n- Mail Server Port\uff1a25\n- Use ssl: No\n- Account: None\n- Password: None\n- Attachment: /path/to/attachment.pdf\n\n```\npysendmail -f sender@exmaple.com -t recipient@exmaple.com -s 'just a test mail' -a /path/to/attachment.pdf 'just a test mail'\n```\n\n## Releases\n\n### v0.3.4\n\n- Doc update.\n\n### v0.3.3\n\n- Fix ssl context problem.\n- Add attach filename support.\n\n### v0.3.2\n\n- Add verify option. By default python-sendmail will ignore the ssl verify.\n\n### v0.3.1\n\n- Change help information to english.\n- Use new style to release.\n\n### v0.3.0\n\n- Old style release.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Sendmail client. send mail via stmp server.",
    "version": "0.3.4",
    "project_urls": null,
    "split_keywords": [
        "python-sendmail",
        "pysendmail",
        "sendmail",
        "pysendeml",
        "sendeml",
        "mail"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f540a2f3f8850b6a06a9dc310daab320146e446f12c8714b08a6984e69bb12e1",
                "md5": "f03e29a1a2e0a5ea0791fb03ceceefc5",
                "sha256": "504101c66df33c7731c42efe2d2642f4c00ea3ae6ce609650554527f07df7a53"
            },
            "downloads": -1,
            "filename": "python_sendmail-0.3.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f03e29a1a2e0a5ea0791fb03ceceefc5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 6792,
            "upload_time": "2023-09-14T12:50:19",
            "upload_time_iso_8601": "2023-09-14T12:50:19.012627Z",
            "url": "https://files.pythonhosted.org/packages/f5/40/a2f3f8850b6a06a9dc310daab320146e446f12c8714b08a6984e69bb12e1/python_sendmail-0.3.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "f170676e1181f3577de611c3c747f15b777ce922c709d16bb21f58e8535efec4",
                "md5": "1a7da7e1009ba190b1ec457117e9d581",
                "sha256": "92e68c49b800f88e7aa25eba7f30e1cf7357a362deee6cce8da3fbcda0e82777"
            },
            "downloads": -1,
            "filename": "python-sendmail-0.3.4.tar.gz",
            "has_sig": false,
            "md5_digest": "1a7da7e1009ba190b1ec457117e9d581",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 6155,
            "upload_time": "2023-09-14T12:50:20",
            "upload_time_iso_8601": "2023-09-14T12:50:20.344184Z",
            "url": "https://files.pythonhosted.org/packages/f1/70/676e1181f3577de611c3c747f15b777ce922c709d16bb21f58e8535efec4/python-sendmail-0.3.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-09-14 12:50:20",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "python-sendmail"
}
        
Elapsed time: 0.14633s