Send Mail
This package makes it much easier to send emails in python.
Installation
Install on Linux/MacOS:
python3 -m pip install send_mail
Install on Windows:
python -m pip install send_mail
Usage
from send_mail import SendMail
# Create SendMail object
new_mail = SendMail(
# List (or string if single recipient) of the email addresses of the recipients
['recipient1@email.com', 'recipient2@email.com'],
# Subject of the email
'Email Subject',
# Body of the email
'Email Body',
# Email address of the sender
# Leave this paramter out if using environment variable 'EMAIL_ADDRESS'
'sender@email.com'
)
# Add HTML
new_mail.add_html_message('<h1>Hello, World</h1>')
# If using HTML file
# new_mail.add_html_file('/path/to/your/html/file')
# List (or string if attaching single file) of relative or absolute file path(s) to files
new_mail.attach_files(['image.jpg', 'text.txt', 'myPDF.pdf'])
# Print SendMail object to confirm email
print(new_mail)
# Send the email
# Leave this parameter out if using environment variable 'EMAIL_PASSWORD'
new_mail.send('fake_password')
Let me know if you would like more email services other than Gmail
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
send_mail-0.0.2.tar.gz
(3.3 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 send_mail-0.0.2.tar.gz.
File metadata
- Download URL: send_mail-0.0.2.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
342a2eb405554c1b74862941aef6e1d96eab6a47cac0969bf212982a5af64c49
|
|
| MD5 |
82b0807d3c8a0f0a7d060a3a6f9b3557
|
|
| BLAKE2b-256 |
8f5ba1b3906247bde3937694e7f0181d16b267af1d8ce5d1e102b26e2add5dbe
|
File details
Details for the file send_mail-0.0.2-py3-none-any.whl.
File metadata
- Download URL: send_mail-0.0.2-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d647f33467495d5bcfcb2facbbaec58629207a53b0ca9cdd2b48b54b01a02e93
|
|
| MD5 |
ac8ef94726cb13b02ba6024894831e1b
|
|
| BLAKE2b-256 |
55e24c4c23e637f03c60f6815c077b2fe640b0771cb0a9ca45f79eccb4b47187
|