https://github.com/aliencn/smail
Smail
https://github.com/aliencn/smail
python sendmail
Last synced: 3 months ago
JSON representation
Smail
- Host: GitHub
- URL: https://github.com/aliencn/smail
- Owner: Aliencn
- License: gpl-3.0
- Created: 2017-03-28T14:32:04.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2025-02-24T17:13:10.000Z (over 1 year ago)
- Last Synced: 2025-09-01T19:49:25.181Z (10 months ago)
- Topics: python, sendmail
- Language: Python
- Homepage: https://www.aliencn.net/archives/272
- Size: 15.6 KB
- Stars: 26
- Watchers: 1
- Forks: 6
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
###Smail
Python send mail
###Installation
Python 3.4 or later
From pip
```
pip install Smail
```
###Use
```
from Smail import Smail
a=Smail()
a.set_server("smtp.exmail.qq.com",465,"admin@aliencn.net","password")
a.set_subject('hello')
a.set_content('world')
a.add_to_addr('admin@aliencn.net')
#Optional
a.add_cc_addr('admin1@aliencn.net')
a.add_cc_addr('admin2@aliencn.net')
a.add_bcc_addr('admin3@aliencn.net')
a.add_bcc_addr('admin4@aliencn.net')
a.add_attachment(r'D:\Alien_System\Desktop\0.jpg')
a.add_attachment(r'D:\Alien_System\Desktop\1.exe')
#send mail now
a.send()
```