Async email sending utility powered by Microsoft Graph, using token-service-toolcae for auth.
Project description
email-service-tool
email-service-toolcase is an async email sending utility powered by Microsoft Graph API.
It automatically uses token-service-toolcase to fetch OAuth2 access tokens with the Client Credentials flow.
Installation
pip install email-service-toolcase
Usage
from email_service_toolcase import EmailService
email_service = EmailService(
client_id="YOUR_CLIENT_ID",
client_secret="YOUR_CLIENT_SECRET",
tenant_id="YOUR_TENANT_ID",
scope="https://graph.microsoft.com/.default",
sender_email="no-reply@yourdomain.com",
graph_base_url="https://graph.microsoft.com/v1.0",
)
result = await email_service.send_email(
to_emails=["user@example.com"],
subject="Hello!",
html_body="<h1>Welcome</h1>",
api_url="https://graph.microsoft.com/v1.0/users/YOUR_SENDER_ID/sendMail"
)
Project details
Release history Release notifications | RSS feed
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 email_service_toolcase-0.1.0.tar.gz.
File metadata
- Download URL: email_service_toolcase-0.1.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1f490ae19e71a91a62b25c346d370d9e13c4f8f26515f198112be8a4ca9d94f9
|
|
| MD5 |
4ffa2796569d7d295746a876b87eb66f
|
|
| BLAKE2b-256 |
055d896cefacb1d5e9cf722c5197fa2c6f42c66703030ff9782de0930ff92a48
|
File details
Details for the file email_service_toolcase-0.1.0-py3-none-any.whl.
File metadata
- Download URL: email_service_toolcase-0.1.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bbc7c9c17b4851c105f8e6dbf23235ca0f920ba726b6393b3525e99218c2d80a
|
|
| MD5 |
0899f24c2ae62fac3d359c59f47a1bc8
|
|
| BLAKE2b-256 |
1befabe41cf3d6a1bd87b161a616a7673904ebba1a10f634cea267c9ae661ce5
|