Skip to main content

Qmail

In this documentation 👇

Features

Qmail makes sending emails Quick and easy:

📨 Email Smtp:

  • Supports all email providers supported with Python. (Defaulted at smtp.gmail.com)

  • Email Spam Bot

  • HTML, PLAIN, Attachments

🔑 OTP Services:

  • OTP Msg class used with Email Smtp

  • OTP Generator (Alpha Numerical & Numerical)

  • 3 HTML Themes

👤 Email Addr That Anyone Can Use:

USAGE

Installation

  1. Python 3.8 or newer environment recommended

  2. Install Qmail

    Open up terminal and type

    
    pip install Qmail
    
    

    For mac

    
    pip3 install Qmail
    
    

SMTP

Create Qmail Smtp class.

  1. import the Qmail library

    import Qmail
    
  2. Create Qmail Class

    sender = Qmail.SMTP(\
    
        EMAIL='yourmail@yourdomain.com', # Default: emailsender437@gmail.com
    
    
    
        PASSWORD= 'Your App Password', # Default: emailsender437 pass
    
        
    
        smtp= "smtp.domain.com", # Ex: smtp.gmail.com, Default : smtp.gmail.com
    
    
    
        reciever_emails= ["Mail To send1", "Mail To Send2", 'etc.'],  # Emails that will be receiving mail.
    
    
    
        port='port to send email in', # Optional
    
    
    
        cc='cc email address', # Give this value if cc is needed in the email
    
    
    
        bcc= 'bcc email address', # Give this value if bcc is needed in the email
    
    )  
    

    SMTP Class Parameters In Detail👇

    ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖
    EMAIL

    Your Email Goes Here

    Strings Are Only Accepted

    ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖
    PASSWORD

    The app password of the email you gave in EMAIL parameter.

    Strings ONLY Accepted

    ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖
    smtp

    The SMTP server of your email's domain

    Ex: smtp.gmail.com for gmail.com domain

Strings ONLY Accepted

###### ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖



##### reciever_emails

#####

Emails of the people your sending to goes here

Ex: ['email1@gmail.com', 'email2@outlook.com', 'email3@yahoo.com']

Lists accepted __ONLY__

###### ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖



##### port *|Optional|*

#####

The Port Number goes here (for SSL connections)

Default: 465

3 Digit Integers __ONLY__ Accepted

###### ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖



##### cc *|Add this value if you want an email to be sent as CC|*

#####

CC Email goes here

Strings __ONLY__ accepted

###### ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖



##### bcc *|Add this value if you want an email to be sent as BCC|*

#####

BCC Email goes here

Strings __ONLY__ accepted

###### ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖



###

#### More Creation Examples

```python

import Qmail



sender = Qmail.SMTP(reciever_emails= ['email1@gmail.com']) # Create a default Qmail smtp server 



sender2 = Qmail.SMTP(\

    EMAIL='Your Mail Goes Here', 

    PASSWORD= "Your EMAIL'S app password goes here.", 

    reciever_emails=['receicermail@yourdomain.com'], 

    smtp= 'Your Emails Smtp Server



) # Create a Qmail smtp server with your email. 



```

Send Emails
  1. Invoke the send_mail function on Qmail SMTP class

    import Qmail
    
    
    
    sender = Qmail.SMTP('parameters 👆')
    
    
    
    # To send
    
    sender.send_mail(message= 'Any Qmail MSG Class. (OTP, MSG, HTML_MSG)' )
    
  2. Qmail Smtp class spammer

    import Qmail
    
    
    
    sender = Qmail.SMTP('parameters 👆')
    
    
    
    # To Spam
    
    sender.spam_mail(message= 'Any Qmail MSG Class. (OTP, MSG, HTML_MSG)', num = 10 )
    
    # num= ammount of mails to send (Integer ONLY)
    

Qmail Msg Class

Create Qmail MSG Class

  1. import the Qmail library

    import Qmail
    
  2. Create Qmail MSG Class

    message = Qmail.MSG(\
    
        subject= 'Subject Of Email',
    
        txt= 'txt in the email',
    
        attachments=['file1', 'file2'] # Add Attachment Filepaths here 
    
    )
    

    Qmail MSG class Parameters In Detail👇

    ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖
    subject

    subject of the email goes here

    Strings Are Only Accepted

    ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖
    txt

    What you want to include in your email goes here

    Strings ONLY Accepted

    ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖
    attachments

    Put filenames here if you want to add them into the email.

Strings ONLY Accepted for 1 file, Lists ONLY Accepted for mutiple

###### ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖



##### Once you create this you can add it to the send_mail and spam_mail functions.

Qmail Html Msg Class

Create Qmail HTML MSG Class

  1. import the Qmail library

    import Qmail
    
  2. Create Qmail HTML_MSG Class

    message = Qmail.HTML_MSG(\
    
        subject= 'Subject Of Email',
    
        html= '<h1>Enter Html Here</h1>',
    
        attachments=['file1', 'file2'] # Add Attachment Filepaths here 
    
    )
    

    Qmail HTML MSG class Parameters In Detail👇

    ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖
    subject

    the subject of the email goes here

    Strings Are Only Accepted

    ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖
    html

    Html goes here

    Strings ONLY Accepted

    ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖
    attachments

    Put filenames here if you want to add them to the email.

Strings ONLY Accepted for 1 file, Lists ONLY Accepted for mutiple

###### ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖



##### Once you create this you can add it to the send_mail and spam_mail functions.

Qmail Otp Services

Generate OTP

  1. import the Qmail.OTP library

    from Qmail import OTP
    
  2. generate OTP function

    otp = OTP.generateOTP(lenght=4, type='numeric')
    
    # generateOTP returns OTP as string
    
    
    
    #### Types ####
    
    ## numeric
    
    # ex: 198745
    
    
    
    ## alphanumeric
    
    # ex: YRjliMZLx4 
    

    generateOTP() Parameters In Detail👇

    ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖
    lenght

    Lenght of OTP goes here

    Integers Are ONLY Accepted

    ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖
    type

    OTP type: numeric or alphanumeric

    Strings ONLY Accepted

    ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖
Create OTP MSG Class

  1. import the Qmail.OTP library

    from Qmail import OTP
    
  2. Create Qmail OTP_EMAIL Class

    from Qmail import OTP
    
    
    
    one_time_password = OTP.generateOTP(lenght=10, type='alphanumeric')
    
    NAME = 'Qmail'
    
    themes_available = ['simple', 'default', 'modern']
    
    
    
    message = OTP.OTP_EMAIL(subject='OTP MAIl', otp=one_time_password, brand_name=NAME, theme='default')
    

    Qmail HTML MSG class Parameters In Detail👇

    ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖
    subject

    the subject of the email goes here

    Strings Are ONLY Accepted

    ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖
    otp

    OTP goes here

    Strings ONLY Accepted

    ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖
    brand_name

    your companies name or project name goes here.

    Strings ONLY Accepted

    ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖
    theme

    choose one of the 3 themes

    default, simple, modern

    Strings ONLY Accepted

    ➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖➖
    Once you create this you can add it to the send_mail and spam_mail functions.

Authors

Akmal Riyas

Modules Used

- email
- smtplib
- ssl
- random
- math
- Qmail

Thanks For Using My Module

Metadata

Release files for Qmail 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Qmail 0.0.1
File Size Uploaded Provenance
Qmail-0.0.1.tar.gz 12.0 kB Without provenance Details

Release files / Qmail-0.0.1.tar.gz

Download URL Qmail-0.0.1.tar.gz
Size 12.0 kB
Tags Source
SHA-256 checksum
How to use checksums
7f350800a58ad32a6b169a369fef61f5a61b84cd3c1fa70374af3c44a59b1bd9
BLAKE2b-256 checksum
How to use checksums
ba70c1021b4fe10e04ab53222a938365bbf99712a283e6d1f7884eecd95a1b5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.11

Security for Qmail 0.0.1

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.

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page