A Simple Email Dispatcher based on top of win32Api
Project description
Outlook Email Dispatcher
A Simple Email Dispatcher based on top of win32Api
Installation
pip install pyoutlookdispatcher
Examples of Usage:
Send Email with Attachments
By default it adds your signature if you have one.
import os
from pyoutlookdispatcher import Outlook, Mail
FILES_TO_ATTACH_FOLDER = os.path.join(os.getcwd(), 'files_to_attach')
ATTACHMENTS = [os.path.join(FILES_TO_ATTACH_FOLDER, f) for f in os.listdir(FILES_TO_ATTACH_FOLDER)]
mail = Mail(
Subject="Teste",
To="example@example.com",
HTMLBody="Teste",
CC="example@example.com",
Attachments=ATTACHMENTS
)
outlook = Outlook()
outlook.send(mail)
Send Email without Signature
from pyoutlookdispatcher import Outlook, Mail
mail = Mail(
Subject="Teste",
To="example@example.com",
HTMLBody="Teste",
CC="example@example.com",
Attachments=ATTACHMENTS,
Signature=False
)
outlook = Outlook()
outlook.send(mail)
Preview an Email
from pyoutlookdispatcher import Outlook, Mail
mail = Mail(
Subject="Teste",
To="example@example.com",
HTMLBody="Teste",
CC="example@example.com",
Attachments=ATTACHMENTS,
)
outlook = Outlook()
outlook.preview(mail)
Object Mail Params:
Subject: str
To: str
HTMLBody: str
CC: Optional[str] = None
Attachments: Optional[List[str]] = field(default_factory=list)
Signature: Optional[bool] = True
Short Use Cases:
Initialize Outlook
Instanciate an Object from Outlook Class
outlook = Outlook()
Preview Mail:
outlook.preview(mail)
Send Mail:
outlook.send(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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file PyOutlookDispatcher-0.2.0.tar.gz.
File metadata
- Download URL: PyOutlookDispatcher-0.2.0.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.0 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d79c6e4c7c4e3b1e9bd4ef09310e594b74920ea5b567fcbcd61a0f4eb3dbb697
|
|
| MD5 |
da16eef58a7d4ff2c9d307ec45d2afb2
|
|
| BLAKE2b-256 |
b69d48c2f40d7359d681af6a70aca8effd6ec71b3df040a8b243719be6d5845a
|
File details
Details for the file PyOutlookDispatcher-0.2.0-py3-none-any.whl.
File metadata
- Download URL: PyOutlookDispatcher-0.2.0-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.9.0 Windows/10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ee114a1e16c8d57a457d204832294c73fae6704d72a671912a688cb9783eb7e7
|
|
| MD5 |
bf88bf1eff5f28aca4415f8aaaf8f25d
|
|
| BLAKE2b-256 |
1b17582f9d060280e9cebc61c2112c387d2b1ea73769fcee629ee207794da695
|