Skip to main content

A full featured email status notifier for python

Project description

A module for quickly sending email status and alerts from python programs

This script was created to notify me when a job was completed (and sometimes include an exit status and relevant results)

Notipy is compatible with both python2 and python3

Instructions

Get Notipy

From PyPi

pip install notipymail

From Source

git clone https://github.com/nbryans/notipymail.git
python setup.py sdist
# Move dist\*.zip to desired location. Extract zip
cd Notipy-X.X
python setup.py install

On First Run

In a python session

import notipymail.notipy as notipy
notipy.updateSendDetails('yourEmail@emailProvider.com', 'yourPassword', 'smtp.emailProvider.com', '587')

This will create file senddetails.dat containing the following contents:

email:email@emailProvider.com
password:yourPassword
server:smtp.emailProvider.com
port:587

Optionally, you can create this file manually.

Sending Emails with Notipy:

import notipymail.notipy as notipy
notipy.sendMail("to@address.com", "This is a message")

Notes

Use notipy.sendMailAsync(..) to send mail in the background asynchronously.

Send status are logged in notipy.log. The log file can be changed in the #Constants section of notipy.py

To query the log through python, use notipy.queryLog(5) where 5 specifies the number of log entries (most recent to least) to retrieve. This operation may be slow for large logs.

In sendMail and sendMailAsync, there is an optional third parameter where you can specify a subject. i.e. notipy.sendMail("to@address.com", "This is the message", "Custom Subject"). The default subject is “Notipy Automail”

Acknowledgements

Logo created using modified images originally distributed by Pixabay.com https://pixabay.com/en/cartoon-snake-yellow-1293047/ https://pixabay.com/en/email-letter-contact-message-mail-309678/

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

notipymail-1.0.zip (7.2 kB view details)

Uploaded Source

File details

Details for the file notipymail-1.0.zip.

File metadata

  • Download URL: notipymail-1.0.zip
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for notipymail-1.0.zip
Algorithm Hash digest
SHA256 85c774e102639c4027cc32a8424ee1ec07456cf3fd99f5a38dec615065bb0b4b
MD5 79a11901f4c0d67e6d7ec9f579d7c506
BLAKE2b-256 256434e53ace9af877573c4dc0054dd76855781ba00a4265aae1e0d12d3d0712

See more details on using hashes here.

Supported by

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