https://github.com/nobodyinperson/python3-mimplesail
Python module for simple email sending
https://github.com/nobodyinperson/python3-mimplesail
email python python-library smtp
Last synced: about 1 month ago
JSON representation
Python module for simple email sending
- Host: GitHub
- URL: https://github.com/nobodyinperson/python3-mimplesail
- Owner: nobodyinperson
- License: gpl-3.0
- Created: 2017-01-26T08:44:36.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-01-26T10:51:30.000Z (over 9 years ago)
- Last Synced: 2025-10-11T06:59:06.585Z (8 months ago)
- Topics: email, python, python-library, smtp
- Language: Python
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# python3-mimplesail
Python `email`/`smtplib` wrapper module for simple email sending including attachments and inline images.
## Usage
```python
import mimplesail
# create mailer
mailer = mimplesail.Mailer(
server = "mail.server.com",
port = 587,
email = "address@server.com",
password = "thepassword",
)
# create an html body text
htmlbody = """
Hey!
This is the HTML Mail text.
You can add inline images:
"""
# add all content
mailer.add_html(htmlbody) # add the html body
mailer.add_inline_image("temp/inlineimage.png") # add the inline image
mailer.add_attachment_image("temp/attachmentimage.png") # add an attachment image
# send the email
mailer.send(
subject = "Mail sent with mimplesail Python module",
recipient = "receipient@server.com"
)
```