Actionmailer / @recipeints

Hi all,

i’m trying to email multiple people based on certain criteria.

i do a search like

@stacks = Group.find(:all, :conditions => [“component_id = ?”, 2])
this populates stack to contain multiple groups with component_id =2.
How do i populate @recipients to contain all possible

Let me clearify. Each stack has its own email, and i need to include
each into @recipients.

i’ve been trying to do

@stacks.each do |stack|
@recipients =

But i know this is wrong, but i think it’s a step in the right direction

Please help if possible,

@recipients =

@stacks.each do |stack|
@recipients <<

would do the trick. If you only want to load the email attribute you can
a finder that only loads that field as well.

You want to iterate through @stacks, adding the emails to an array:

@recipients = []
@stacks.each {|stack| @recipients <<}

or, more directly:

@recipients = {|stack|}

        - dan

Dan K. mailto:[email protected] tel:+1-415-233-1000