A simple way to send email. for MPT
Project description
mpt-email-client
install
pip install mptemail
how to use
import mptemail
status = mptemail.sendEmail(
subject="test",
message="helloworld",
emails=["admin@admin.com"],
attachments=["test.txt"],
host="https://email-service.xxx.com",
api_key="<API_KEY>",
verify_ssl=False
)
print(status)
| variable | dtype | description |
|---|---|---|
| subject | str | subject of email |
| message | str | email body can contains html string |
| emails | List[str] | email to send message |
| attachments | List[str] | list of filepath(str) to attach files |
| host | str | email server uri |
| api_key | str | api_key for email services |
| verify_ssl | bool | set ssl verify true or false |
output
[(True, 'email send to admin@admin.com sucess')]
status
True = send email sucess
False = send email fail
msg
string describe status
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
mptemail-0.0.2.tar.gz
(6.0 kB
view details)
File details
Details for the file mptemail-0.0.2.tar.gz.
File metadata
- Download URL: mptemail-0.0.2.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e353937deb0d55c4221600641ff32a977eeab842c63ba1e71d40f474a714c275
|
|
| MD5 |
d407a549eb91059959784f81be7b8939
|
|
| BLAKE2b-256 |
f6e26d2fb754788347ba2b9b9c43f4fb904526b087d19d9f32b8b98184cd279a
|