MailPad Python Library
MailPad is a Python library that simplifies email sending and integrates with language models for generating email content. Utilizing OpenAI's language models to generate text emails.
Installation
You can install MailPad using pip:
pip install mailpad
Sending Email
from mailpad import mailpad
import os
mail = mailpad('smtp-server','smtp-port')
os.environ["MAILPAD_EMAIL"] = "YOUR_EMAIL"
os.environ["MAILPAD_PASSWORD"] = "YOUR_PASSWORD"
from_email = "your_email@exphample.com"
to_email = ["her_email@example.com"]
subject = "Subject"
message = """Message Content"""
mail.send_mail(from_email, to_email, subject, message)
Sending Email With Attachments
from mailpad import mailpad
import os
mail = mailpad('smtp-server','smtp-port')
os.environ["MAILPAD_EMAIL"] = "YOUR_EMAIL"
os.environ["MAILPAD_PASSWORD"] = "YOUR_PASSWORD"
from_email = "your_email@exphample.com"
to_email = ["her_email@example.com"]
subject = "Subject"
message = """Message Content"""
attachment = "/Users/Docs/Letter.pdf"
mail.send_mail_with_attachmnet(from_email, to_email, subject, message,attachment)
Brevo Integration
Create account at: https://www.brevo.com/
from mailpad import mailpad
import os
#Using Brevo Servers
mail=mailpad()
mail.brevo()
os.environ["MAILPAD_EMAIL"] = "YOUR_EMAIL"
os.environ["MAILPAD_PASSWORD"] = "YOUR_PASSWORD"
from_email = "your_email@exphample.com"
to_email = ["her_email@example.com"]
subject = "Subject"
message = """Message Content"""
mail.send_mail(from_email, to_email, subject, message)
Generating Emails With OpenAi
from mailpad import mailpadAI
import os
import openai
os.environ["OPENAI_API_KEY"]="YOUR_OPENAI_KEY"
mail = mailpadAI()
mail.openai()
form_input = "EMAIL_MESSAGE/EMAIL_CONTEXT"
email_sender = "SENDER_NAME"
email_recipient = "RECIPIENT_NAME"
email_style = "EMAIL_STYLE"
response = mail.get_llm_response(form_input, email_sender, email_recipient, email_style)
print(response)
Metadata
Release files for mailpad 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mailpad-1.0.2.tar.gz | 3.8 kB | Without provenance | Details for mailpad-1.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mailpad-1.0.2-py3-none-any.whl | Python 3 | none | any | Details for mailpad-1.0.2-py3-none-any.whl |
Total release size: 8.1 kB
Release files / mailpad-1.0.2.tar.gz
| Download URL | mailpad-1.0.2.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2e19caebfc1812c4ef36b0742beae254fd5fc9ff9603da7b403f53e7b5683123
|
|
BLAKE2b-256 checksum How to use checksums |
454c816badd33fbce3a6bc3c6439be066570170b16d0e700a93f57f700135d19
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / mailpad-1.0.2-py3-none-any.whl
| Download URL | mailpad-1.0.2-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e874ff3295d786b57a3ada35c2beffc8479b9f350b920b7de12cc7eb675a6e9f
|
|
BLAKE2b-256 checksum How to use checksums |
89f4fb6f91c01393ce21ff58767b43b2b12162a4dc20bc58472d7373030e9522
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Security for mailpad 1.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.