ActionMailer Multiple recipients

I am using ActionMailer to send mails. I want to send mails to multiple recipients which I get from a view. Here is the controller code.

def groupcorres     user = User.find(session[:user_id])     address =     lines =     args = params[:id].to_s # params[:id] is an array of user screen name. ex: j_doe, d_john     lines = args.split(",")     for line in lines       recipient = User.find_by_screen_name(line)   email = + ","         address << email     end     if param_posted?(:message)       @message =[:message])       if @message.valid?         UserMailer.deliver_groupmess(           :user => user,           :recipient => address,           :message => @message,           :user_url => profile_for(user),           :reply_url => url_for(:action => "correspond",                                 :id => user.screen_name)         )         flash[:notice] = "Email sent."         redirect_to profile_for(user)       end    end

and in models/user_mailer.rb , I have

def groupmess(mail)     subject mail[:message].subject     from ' Test<>'     recipients mail[:recipient]     body mail   end

This seems to work , but the recipients never receive any emails. Also I saw on the development log , that the"To" field on the email dump is missing. When I send the message to a single user , the "To" address is present.

I think that a string of comma separated email address ex:, for the recipient would work as it does for any email client.

Any ideas what's wrong, Thanks Meenal

You don't need to add commas. that's probably messing everything up.


Thanks Fred, the commas were the problem.