Skip to main content

A python library for recieving email directly in your application using emailjs

Project description

jodev_emailpy

A Python package that helps you send and recieve email directly using emailjs restful service

Getting Started

To install into your python environment use pip install jodev-emailpy

On successfull installation , you are ready to start using jodev_emailpy to start recieving and sending email directly from your client side application no backend server needed

Useage

To send a message to your configured email

from jodev_emailpy import EmailPy

PUBLIC_KEY :str = "YOUR-PUBLIC-KEY-FROM-EMAILJS"
SERVICE_ID : str =  "YOUR-SERVICE-ID-FROM-EMAILJS"
TEMPLATE_ID :str = "YOUR-TEMPLATE-ID-FROM-EMAILJS"
TEMPLATE_PARAMS : dict = {
    # customize to fit as per your template variables requirement e.g
    "email_id" : "jodek@gmail.com",
    "message": "hello test mssg"
    
}
# input your public_key to initialize the client
client = EmailPy(PUBLIC_KEY)

client.send(service_id=SERVICE_ID,  template_id=TEMPLATE_ID, 
template_params=TEMPLATE_PARAMS)

To retrieve a list of email history

ACCESS_TOKEN = "YOUR-ACCESS-TOKEN-SECRET-KEY"
response = client.get_history(access_token=ACCESS_TOKEN)

Other optional arguments to pass to get_history method are :

  • count : int #this is the count of email history to retrieve
  • page : int default is 1 . this helps for pagination

note access token can then be omitted for successive call of get_history()

if response status is 200 without error you should be able to retrieve email history

print(response.json()['rows'])

ensure you have signed up on emailjs website so as to have access to credentials needed. if not, here is their website link to sign up https://dashboard.emailjs.com/sign-up

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

jodev_emailpy-0.1.1.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

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

jodev_emailpy-0.1.1-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

File details

Details for the file jodev_emailpy-0.1.1.tar.gz.

File metadata

  • Download URL: jodev_emailpy-0.1.1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for jodev_emailpy-0.1.1.tar.gz
Algorithm Hash digest
SHA256 6400cd94af62249c1dd6638c8974d2e467e0a96a5958eeadbb12201f382c639d
MD5 8bf07f6455b62fe1613cfac54a90a478
BLAKE2b-256 8d93d985ea01635df1979f85473f13c706fc3eb657424cad1776edb87455fbf9

See more details on using hashes here.

File details

Details for the file jodev_emailpy-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: jodev_emailpy-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 5.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for jodev_emailpy-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 ee946108ca1c9d393a8eda70e23b353e616ce7a2cff1e1ee9ed834821f87eb58
MD5 5f0ee3a911876841e608f19009b5a7c7
BLAKE2b-256 3c8bce996fdf8105fd198d2ff15b097fe90783e9fcac579909e28e4a000a0da2

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