Skip to content

Email Sender Verifier is designed to facilitate the process of sending One-Time Passwords (OTPs) and code verification via email. This library is ideal for web applications that require a secure and straightforward method to authenticate users through email-based account verification.

License

Notifications You must be signed in to change notification settings

christiangarcia0311/email-sender-verifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Static Badge Static Badge Static Badge

Email Sender Verifier

logo

Email Sender Verifier is a python library designed for sending One-Time-Password (OTP) and performing code verification via email. This library is ideal for web applications that require a secure and straightforward method to authenticate users through email-based account verification ans OTPs.

Installation

Install Email Sender Verifier using pip.

CLI:

   pip install email-sender-verifier
   pip install https://github.com/christiangarcia0311/email-sender-verifier/raw/main/dist/email_sender_verifier-2.2.0.tar.gz

Features

  • Email Sending: Send emails with customizable subject, body and recipient.
  • Easy Integration: Suitable for integration into web applications requiring email-based OTP and code verification.

API

We added a simple email sender API using flask. The API allows other application to send email to users by making HTTP requests. It is designed to be easily integrated with other programming language/application or any other platform that can send HTTP requests.

EmailSender API: Click here!

API Test Example sending HTTP request: API Sample

if you have an issue while opening the link please contact me.

Usage

Email Sender class import:

    
    # import email sender class
    from Verifier.email import EmailSender
    
    # create new email sender object
    emailsender = EmailSender()

Email Sender method:

    """
    email_reciever (str): Specifies the recipient's email address where the email will be sent.
    msg_subject (str): Sets the subject line of the email.
    msg_body (str): Contains the main content of the email message.
    sender_name (str): holds the name of the sender.
    
    """
    
    # email sender method
    emailsender.send_email(email_reciever, msg_subject, msg_body, sender_name)

Example 1 (Sending sample message):

    
    # define the email details 
    email = 'username@gmail.com'
    subject = 'Sending email message using python.'
    body = 'This is example message from the author'
    name = 'EmailSender'
    
    # email sender method
    emailsender.send_email(email, subject, body, name)

Example 2 (Using pyotp library):

    
    # Secret key for pyotp
    secret_key = pyotp.random_base32()
    
    # Generate One-Time-Password using pyotp library
    totp = pyotp.TOTP(secret_key, interval=60)
    
    # define the email details
    email = 'username@gmail.com'
    subject = 'One-Time-Password using pyotp library'
    body = f'Your OTP code is: {totp.now()}'
    name = 'EmailSender'
    #email sender method
    emailsender.send_email(email, subject, body, name)

Example 3 default sending:

    email_reciever = 'reciever@gmail.com'
    
    #email sender method
    emailsender.send_email(email)

LICENSE

Static Badge

Author

Static Badge

Contact

For issues or feature requests, please open an issue on GitHub. Contributions, feature requests, and feedback are all welcome!

About

Email Sender Verifier is designed to facilitate the process of sending One-Time Passwords (OTPs) and code verification via email. This library is ideal for web applications that require a secure and straightforward method to authenticate users through email-based account verification.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published