A simple and convinient way to send emails in python
Project description
About
A simple and convinient way to send emails in python
Usage guide
-
Importing the module
from messaging import EmailService, build_message
-
Build an email message
-
Simple
EmailMessagemessage = build_message(fr_addr='john@company.com', # Sender to_addrs=['peter@abc.com'], # List of recipients cc_addrs=['emma@abc.com' ], # List of secondary recipents subject='Subject of Email', content="Plain text contents of the email")
-
Extended
EmailMessagewith html body and attachmentsmessage = build_message(fr_addr='john@company.com', # Sender to_addrs=['peter@abc.com'], # List of recipients cc_addrs=['emma@abc.com' ], # List of secondary recipents subject='Subject of Email', content="Plain text contents of the email", htmlcontent="<h1>Fancy</h1> html content of the email", attachments=['absolute path to the attachment'])
-
-
Instantiate
EmailSeviceand send themessageservice = EmailService(host='smtp.gmail.com', port=587, user='john@company.com', password='This is super secret') service.sendmail(message)
Additional notes:
- While creating
EmailServiceits optional to specify thepassword. If thepasswordis not specified it is assumed that the smtp email server does not require authentication.
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
py3mailer-1.0.0.tar.gz
(3.1 kB
view details)
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 py3mailer-1.0.0.tar.gz.
File metadata
- Download URL: py3mailer-1.0.0.tar.gz
- Upload date:
- Size: 3.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6f1902704419f5f3e901c1b86cf7a8920a3cfc5c08483ec86c32ae03937210d2
|
|
| MD5 |
d833af6bc470f464da3c5abd649b3496
|
|
| BLAKE2b-256 |
5cfa91555be872e5f5610945a000662cfda39391c1bd859655d9add20af2e061
|
File details
Details for the file py3mailer-1.0.0-py3-none-any.whl.
File metadata
- Download URL: py3mailer-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c23e36608cd64fadb2e09dadcbb7d829390e111d48ef92d150868e8e68117e74
|
|
| MD5 |
438dcf7009fe84a191c344d5682acf34
|
|
| BLAKE2b-256 |
04cd35ff86f92648139c59389412fd79dcd7921745d5a3c3771c305ce2ce890d
|