Implement simple email broadcasting interface.
Project description
Stack:
Installation
pip install email-broadcasting
Usage
Asyncio with SSL
import asyncio
from email_broadcasting import MailBroadcasterAsyncSmtpSSL
async def main():
config = dict(
login=EMAIL_SERVER_LOGIN,
password=EMAIL_SERVER_PASSWORD,
host=EMAIL_SERVER_HOSTNAME,
port=EMAIL_SERVER_PORT,
)
mailer = MailBroadcasterAsyncSmtpSSL(**config)
await mailer.send_emails(
recipients=[LIST_OF_RECIPIENTS],
subject=EMAIL_SUBJECT,
body=EMAIL_BODY,
send_from=EMAIL_SENT_FROM,
)
if __name__ == '__main__':
asyncio.run(main())
Sync with SSL
from email_broadcasting import MailBroadcasterSyncSmtpSSL
def main():
config = dict(
login=EMAIL_SERVER_LOGIN,
password=EMAIL_SERVER_PASSWORD,
host=EMAIL_SERVER_HOSTNAME,
port=EMAIL_SERVER_PORT,
)
mailer = MailBroadcasterSyncSmtpSSL(**config)
mailer.send_emails(
recipients=[LIST_OF_RECIPIENTS],
subject=EMAIL_SUBJECT,
body=EMAIL_BODY,
send_from=EMAIL_SENT_FROM,
)
if __name__ == '__main__':
main()
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
File details
Details for the file email_broadcasting-0.1.4.tar.gz
.
File metadata
- Download URL: email_broadcasting-0.1.4.tar.gz
- Upload date:
- Size: 2.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.4 Linux/6.8.0-45-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c82553d4f74b07e2e55541664a4cf1cb2f56855a92945323c1c4f9b735ee4f35 |
|
MD5 | 88c077cbdbc7da37d49ff81e5ffb0146 |
|
BLAKE2b-256 | 7fe3e9baf4116887dfd70078c2804694b5176597dd1e9733c6bdac63ee71009c |
File details
Details for the file email_broadcasting-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: email_broadcasting-0.1.4-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.11.4 Linux/6.8.0-45-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82aa77b933e11725af76daa93bc4ba722de65749968d89ced9d3aab2c7eaeb58 |
|
MD5 | 95b68d83de6e7ab4c77d8d230f221786 |
|
BLAKE2b-256 | 4a0a565faee29312898f67d2a15062b6fec4df2ada834137d80056322d1aaafc |