Convert the IMailer dummy implementation to a repoze.sendmail queue that is drained by a console script.
Background
============
KARL3 has a bunch of communities (projects). You an add existing KARL3 users to your community. You can also invite a new user to join your community and thus KARL3. Both of these user stories result in sending an email to the person.
The Invite New User screen/view can be reached by:
Summary
===========
Convert the IMailer dummy implementation to a repoze.sendmail queue that is drained by a console script.
Background
============
KARL3 has a bunch of communities (projects). You an add existing KARL3 users to your community. You can also invite a new user to join your community and thus KARL3. Both of these user stories result in sending an email to the person.
The Invite New User screen/view can be reached by:
- Go to http:// localhost: 6543/communitie s/default
- Most likely, get redirected to login then redirected back
- Click in the "Members" link above the green Edit box, taking you to Go to http:// localhost: 6543/communitie s/default/ members
- Click the "Invite New" action in the green actions box.
- Put your email on a line in the text area, type in a short message, then click submit.
Coding
============
Here are some starter points on knowing your way around the code:
- The view that implements this is in karl.views. members. invite_ new_user_ view
- This line sends the mail:
mailer. send(info[ 'mfrom' ], to_email, message, info['subject'])
- The IMailer utility is implemented in karl.utilities. mailer
- ISettings provides the mail server location. It is controlled using the standard BFG ISettings concept, which means the knob is in etc/osi.ini.
Tasks
=========
- Re-implement the Mailer class to use repoze.sendmail and a queue
- Make sure the console script in bin correctly drains the queue and reports any errors
- Consider moving the ILogger out of the views and into the Mailer.send method
- Make sure the logger is wired up appropriately
- Document (and email Paul) how the script runs that drains the queue, any configuration, etc.