Emails that get sent out on various site actions

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Emails that get sent out on various site actions

Joe Van Dyk
Hi,

I have a list of various "events" that emails should be sent out on.
Example: user registers with site, or a user takes a test.

And I want the admin user to be able to configure what email addresses
should receieve the emails that get sent out on the events.  Example:
[hidden email] and [hidden email] get an email when a user registers, and
[hidden email] gets an email when a user takes a test.

Any advice?  My initial approach would be to create a table called email_events:

id
key
email_addresses (comma-deliminated list of addresses)

And then, when a user registers, it looks up the 'User_Registration'
key in email_events and sends emails out to all the email addresses.

I haven't done much work with email handling in Rails, so I don't know
if there's a better way to integrate this with ActionMailer.

Thanks!
Joe
_______________________________________________
Rails mailing list
[hidden email]
http://lists.rubyonrails.org/mailman/listinfo/rails
Reply | Threaded
Open this post in threaded view
|

Re: Emails that get sent out on various site actions

Gerard Petersen
Joe,

I am a Ruby Newbie but have dealt with this matter before.

imho using (trigger or event) groups is rather easy. If an event gets
triggered al recipients in the group are mailed. Correctly normalized in a db
this would result in at least two tables related with
"has_many_and_belongs_to".

Regards,

Gerard.


On Friday 23 December 2005 19:08, Joe Van Dyk tried to type something like:

> Hi,
>
> I have a list of various "events" that emails should be sent out on.
> Example: user registers with site, or a user takes a test.
>
> And I want the admin user to be able to configure what email addresses
> should receieve the emails that get sent out on the events.  Example:
> [hidden email] and [hidden email] get an email when a user registers, and
> [hidden email] gets an email when a user takes a test.
>
> Any advice?  My initial approach would be to create a table called
> email_events:
>
> id
> key
> email_addresses (comma-deliminated list of addresses)
>
> And then, when a user registers, it looks up the 'User_Registration'
> key in email_events and sends emails out to all the email addresses.
>
> I haven't done much work with email handling in Rails, so I don't know
> if there's a better way to integrate this with ActionMailer.
>
> Thanks!
> Joe
> _______________________________________________
> Rails mailing list
> [hidden email]
> http://lists.rubyonrails.org/mailman/listinfo/rails

--
"Who cares if it doesn't do anything?  It was made with our new
Triple-Iso-Bifurcated-Krypton-Gate-MOS process ..."

My $Grtz =~ Gerard;
~
:wq!



_______________________________________________
Rails mailing list
[hidden email]
http://lists.rubyonrails.org/mailman/listinfo/rails