Email sender
Project description
Emailer
Send Email easily with python.
Installation
- Install Package Using
pippython3 pip install Emailer
How to use:
-
How to send Email
from Emailer.core import EmailSender # Configuring HOST HOST_USER = 'example@gmail.com' HOST_PASSWORD = 'secretpassword' sender = EmailSender(HOST_USER, HOST_PASSWORD) # Lets send the email # This is out email content (a html file) You can also refer # to variables like jinja template html_file_path = '/some/path/name.html' # <h1>Hey {{ name }}<h1> context = {'name': 'Anonymous'} # The value of variable in html {{ name }} receiver = 'someone@gmail.com' subject = 'Nothing Special' sender.send( receiver=receiver, subject=subject, template=html_file_path, context=context ) # And done.Email sent 🎊🎉
-
You can also send text instead of html file
Defaultly its set to TEMPLATE_TYPE_PATH to use html file pathfrom Emailer import template_types sender.send( receiver=receiver, subject=subject, template='Just a text', template_type=template_types.TEMPLATE_TYPE_TEXT ) # Just change the template type to text.
-
Changing Server, Port
defaultly its set to Gmail server:'smtp.gmail.com', port:465sender.send( receiver=receiver, subject=subject, template='Just a text', template_type=template_types.TEMPLATE_TYPE_TEXT, SERVER='Email server', PORT='Email servers port' )
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
Emailer-1.1.tar.gz
(3.7 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
Emailer-1.1-py3-none-any.whl
(4.1 kB
view details)
File details
Details for the file Emailer-1.1.tar.gz.
File metadata
- Download URL: Emailer-1.1.tar.gz
- Upload date:
- Size: 3.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d192b57cb3c232c2b799d0ba02b3c8923d56af5ddf3ee32879dedd650ae0d066
|
|
| MD5 |
3498f94feb1a4d771823bfe8e24db1cb
|
|
| BLAKE2b-256 |
83bd26a4161bfa30796ca71142ca65a7383253a96cd20f9cdfbf67ff76f55ef3
|
File details
Details for the file Emailer-1.1-py3-none-any.whl.
File metadata
- Download URL: Emailer-1.1-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c0bfe2b0b49a6745db917c251324a7546375e563d8fd96140b1870a4d02e0a1
|
|
| MD5 |
5a026140758271a8c1b2458208402602
|
|
| BLAKE2b-256 |
5edd90002dbafb1876e469b238cbf72d3babbac4746967bec51f27e5701fdb5d
|