Created
November 28, 2015 10:11
-
-
Save pravj/bca8fde3fe15b0107bef to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from flask import Flask, request | |
import logging | |
LOG_FILE = './log/mailer.log' | |
logging.basicConfig(filename=LOG_FILE, level=logging.INFO) | |
app = Flask(__name__) | |
@app.route('/mailman', methods=['POST']) | |
def store_content(): | |
try: | |
logging.info("row : {0}".format(request.args['email'])) | |
return 'OK', 200 | |
except Exception, e: | |
raise e | |
if __name__ == '__main__': | |
app.run() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment