API for composing emails through an external application
Project description
**mailcomposer** aims to provide a simple, cross-platform interface for composing emails through an external application like Microsoft Outlook. Some reasons you might use it are:
* You're behind a corporate firewall, and are only able to send email using Outlook.
* You don't have an SMTP server, or don't want the hassle of using `smtplib`.
* You just prefer your desktop email client.
Here's how easy it is to use:
```python
# This automatically selects an appropriate email application
from mailcomposer import MailComposer
mc = MailComposer()
# Set some message headers
mc.to = "nobody@example.com"
mc.subject = "Testing mailcomposer"
# Set the message body
mc.body = "This is a demonstration of the mailcomposer package."
# Attach this README file
mc.attach_file("README.md")
# Display the message in your email application
mc.display()
```
## Features
Notable features include:
* Straightforward API
* Cross-platform
* Runs on both Python 2 and 3
* Uses your desktop email client; no SMTP server required
* To, CC, and BCC fields accept single recipients or Python lists
* Messages can be composed in either plain-text or HTML format
* Attachments are easy -- just pass the filename
## Supported Email Applications
Supported email applications currently include:
* Microsoft Outlook (Windows only; requires [pywin32](https://pypi.org/project/pywin32/))
* Mozilla Thunderbird
* You're behind a corporate firewall, and are only able to send email using Outlook.
* You don't have an SMTP server, or don't want the hassle of using `smtplib`.
* You just prefer your desktop email client.
Here's how easy it is to use:
```python
# This automatically selects an appropriate email application
from mailcomposer import MailComposer
mc = MailComposer()
# Set some message headers
mc.to = "nobody@example.com"
mc.subject = "Testing mailcomposer"
# Set the message body
mc.body = "This is a demonstration of the mailcomposer package."
# Attach this README file
mc.attach_file("README.md")
# Display the message in your email application
mc.display()
```
## Features
Notable features include:
* Straightforward API
* Cross-platform
* Runs on both Python 2 and 3
* Uses your desktop email client; no SMTP server required
* To, CC, and BCC fields accept single recipients or Python lists
* Messages can be composed in either plain-text or HTML format
* Attachments are easy -- just pass the filename
## Supported Email Applications
Supported email applications currently include:
* Microsoft Outlook (Windows only; requires [pywin32](https://pypi.org/project/pywin32/))
* Mozilla Thunderbird
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
mailcomposer-0.1.0.tar.gz
(6.0 kB
view details)
Built Distribution
File details
Details for the file mailcomposer-0.1.0.tar.gz
.
File metadata
- Download URL: mailcomposer-0.1.0.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b905f7027d5350ab4ff53c1545cc139e233cc16fcd9e263434c5ca9aaf5fd61e |
|
MD5 | 0e0cbf132b81fc44545374442fc62f12 |
|
BLAKE2b-256 | 3798d92ba7be6e33be66bb6771b1ea8d5d882ca623d3007babe93ef14947a635 |
File details
Details for the file mailcomposer-0.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: mailcomposer-0.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 9.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e0d6ca7cb024899fdaa16fe4cc3b44e204caced524ddc3f190d77c6093f9e97 |
|
MD5 | f7cec3467b8f4e67631e8e5cade0fcf3 |
|
BLAKE2b-256 | 23728138b93dc270caef724f99412051d953361c498fd7258f096b8199e3a9da |