Modified ADMINS list in config.py.
Added Mail object to app/__init__.py.
Added MAIL_USE_TLS and MAIL_USE_SSL.
Trying out the Flask-Mail extension in interpreter.
Added the correct settings to config.py, esp mail port.
Added a source file for emailing.
Contains send_email method.
Added a follower_notification function to app/emails.py.
This sends notifications when someone follows a user.
render_template can be used to render text files which have email (text) templates.
Minor fixes in follower_notification.
Added follower_email.txt.
It contains the body of email text and is rendered by render_template so that placeholders get their values.
Added follower_email.html template.
Usually url_for generates URLs that are relative to the domain from which the current page comes.
In an email there is no domain context, so fully qualified URLs need to be forced to include the domain. This is what _external is for.
Added a follower_notification call to the follow function in app/views.py.
Made emailing an asynchronous task.
This way, a thread is invoked which does the email processing in the background and the browser refresh/redirect is not delayed.
Created a generic decorator for asynchronous processing.
Instead of having to write the Thread code everytime we introduce async, we write a decorator for this purpose which can work with any target function.
The next step is to use this decorator in the email function.
Incorporated the async decorator in app/emails.py.
Minor mistake in follower_email template.
Merge pull request #10 from VaticanCameos/ch11

Adding chapter 11