Skip to content

Commit

Permalink
Updated README with API
Browse files Browse the repository at this point in the history
  • Loading branch information
Badgerati committed Jun 29, 2015
1 parent 5ca06bc commit e56d9db
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
19 changes: 17 additions & 2 deletions README.md
@@ -1,7 +1,7 @@
smtpy
=====

(Pronouced: s-m-t-pee)
(Pronounced: s-m-t-pee)

As of late I've has a lot of hassle with QA, regression runs and dev PCs when it comes to sending out email from testing a web app.
Most of them have an SMTP server - but it's absolutely rubbish and fills up way too quickly and then dies miserably.
Expand All @@ -12,6 +12,7 @@ Now I could run a regression without worrying about the server crumbling to piec

Email sent from the webserver can now be directed to the localhost, and picked up by smtpy.


Usage
-----

Expand Down Expand Up @@ -42,4 +43,18 @@ Features

* Supports UTF-8
* Self cleaning so it doesn't gobble up memory
* Lightweight
* Lightweight


API
---

All methods are accessed via the host:port that you specify in the smtpy_config.py.

* /retrieve/email?mailLogId=<mailLogId>
* /retrieve/emails?email=<emai>[&amount=<amount>]

* /create/email?sender=<sender>&recipients=<recipients>[&subject=<subject>&body=<body>&ip=<ip>&port=<port>]

* /delete/email?mailLogId=<mailLogId>
* /delete/emails?email=<emai>
10 changes: 0 additions & 10 deletions smtpy_api.py
@@ -1,16 +1,6 @@
#! /usr/bin/env python3
"""
Simple JSON REST API for the smtpy service using the bottle framework.
Ony contains two retrievals currently:
- /email?email=<email>
This will retrieve the first entry in the database (if any) for
the supplied email address.
- /emails?email=<email>[&amount=<value>]
This will retrieve an amount of entries from the database for the
supplied email. If the amount parameter is omitted, it is defaulted
to 1.
Copyright (c) 2015, Matthew Kelly (Badgerati)
License: MIT (see LICENSE for details)
Expand Down

0 comments on commit e56d9db

Please sign in to comment.