Email-To-SMS
Script that sends/publishes Emails to SMS subscribers using Amazon Web Services SNS and a Flask frontend for enrollment.
To run do the following:
Perlimenaries
- Have an AWS account.
- Use the SNS service to create a topic and add subscribers either through the web console or the web subscriber(below). You can also use the code in the web subscriber(sns-subscriber.py) to write your own script that handles subscriptions.
- If your running the publisher on an AWS node then set up one up as well, I used a micro instance and it seemed to handle this just fine.
WebSubscriber
- Install flask
- Enter your topicarn in sns-subscriber.py
- Run flask server: nohup python sns-pulbisher.py &
- Make sure firewall rules are set and you have an elastic ip (recommended).
- Go to web page.
- Enter mobile phone number or email address you wish to subscribe, confirmation will be sent shortly after. *Note: At the tiem of this writing, SMS only works on east region hosts and US numbers are only supported.
Publisher
- Enter POP3 email and credential details into the sns-publish.py file.
- Enter topicarn.
- Run as cronjob. For example to run every 5 minutes: *crontab /5 * * * * python sns-publish.py