store everything in a db. don't be too fussy about the design. you're just 
crunching emails.

That's the thing. I do want to store everything in the DB! Since we have so many front ends, I'd much rather control all the emailing with triggers and stored procedures (and a background running process) than inside the application.

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:

type: forgotpassword
to: user_id
status: 0

When the email is generated, status changes to 1, or something similar.

-M
_______________________________________________
New York PHP Users Group Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

http://www.nyphp.org/Show-Participation

Reply via email to