Skip to main content

A simple, intuitive Gmail SMTP email library

Project description

ZapMail

ZapMail is a simple Python library to send emails via Gmail's SMTP server. It supports plain text, HTML content, attachments, and CC/BCC fields.

Installation

pip install ZapMail
from ZapMail.emailer import Emailer

emailer = Emailer(
    sender_email="your_email@gmail.com",
    password="your_app_password"
)

success = emailer.send_email(
    recipient=["recipient1@example.com", "recipient2@example.com"],
    subject="ZapMail Feature Demo",
    body_text="This is a plain text body.",
    body_html="""
        <h1>ZapMail Demo</h1>
        <p>This email demonstrates <b>ZapMail</b> features.</p>
        <img src="cid:demoimg">
    """,
    attachments=["/path/to/attachment.pdf"],
    cc="ccperson@example.com",
    bcc=["bcc1@example.com", "bcc2@example.com"],
    reply_to="replyto@example.com",
    inline_images={"demoimg": "/path/to/image.png"},
    custom_headers={"X-Custom-Header": "ZapMailDemo"}
)

if success:
    print("Email sent successfully!")
else:
    print("Failed to send email.")

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

zapmail-1.0.2.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

zapmail-1.0.2-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file zapmail-1.0.2.tar.gz.

File metadata

  • Download URL: zapmail-1.0.2.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for zapmail-1.0.2.tar.gz
Algorithm Hash digest
SHA256 7d2f280708cd1d18dfa20a08802f14f8f7581af1f838fb3520b29de2d0e42d49
MD5 801ab8e3748137ebdf56500027528d0a
BLAKE2b-256 7c43ca7db781e15edcf1a9a6c8b346ca1696cc2c089ef6bf2b7f663e0da9377b

See more details on using hashes here.

File details

Details for the file zapmail-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: zapmail-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for zapmail-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f8636ba67210c9a038fc00759d4e77a6293db809600a7ef8aceb760b32a18b13
MD5 152d60a13b7b5ab1e353c04617f8e2f8
BLAKE2b-256 382ec6a5398b37d18906c6060bb9ba25e21f0baa0d9f2e7b99d2a7e5f91e6482

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page