NYCPHP Meetup

NYPHP.org

[nycphp-talk] email system for website

Gary Mort garyamort at gmail.com
Mon Jan 4 11:16:27 EST 2010


On Mon, Jan 4, 2010 at 10:37 AM, Matt Juszczak <matt at atopia.net> wrote:

>
> Would it really be so bad to do the following for say, a forgot password
> attempt:
>
> - Someone hits "Forgot password" on the site
> - Our front ends calls a stored procedure inside the DB that generates a
> hash, adds a pending email to a "emails" table
> - The background running process picks up the pending email, generates an
> email with the appropriate information, and sends it.
>
> Is that really a bad idea?  It simplifies things on the front end.  And the
> queue isn't storing email content, it would more be storing things like
> this:
>
>

Actually, yes this particular one is a bad idea. :-)

What you want here is a front end process that goes through this, and then a
special queue for immediate deliveries.  You follow the same process for
both, but in the case where you have an immediate delivery situation you
have the front end process kick off the backend process immediately and
process that queue in reverse chronology.

Basically, the idea here is you don't EVER want password and userid reset
requests stuck in a queue with 1000 other emails.  People want those
IMMEDIATELY if not sooner.  I would say do the process the way your thinking
of, but be flexible to have exceptions or odd linkages at times.

Also, I would say you DO want to store the content in the database so you
know what is being sent out.

Lastly, this queue should be a generic message queue, while you are thinking
today "email" many of these notices would help to have OTHER ways of being
sent.  For example, lost password requests can be sent via SMS message as
well as email, and it can be more convenient when someone has changed their
email address but not their cell phone.  By the same token, later you can
extend it to send facebook messages, instant messages, etc.


-- 
----
Hudson Valley Sudbury School
What GPL is for application users
Our school is for students
Help your children grow, change, and learn
Let your child direct, control, amend
Check out http://www.sudburyschool.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20100104/ac9a584f/attachment.html>


More information about the talk mailing list