rovoo,

     The cc is not working for a single string also. I have specified
like
           PersonMailer.dispatch_and_deliver(action, params.merge
(:from => from, :to => to, :cc => "[email protected]" ), self )
  but still i didnt any mail that i have provided in cc .
     I have seen the code in the link that you have specified.
http://gist.github.com/121364
  Am not sure how can i use that in my application. can yoou give some
idea ?


On Jun 1, 5:10 pm, roovo <[email protected]> wrote:
> 2009/6/1 cool <[email protected]>
>
>
>
>
>
> > Jonas,
> >  I have tried like this.
>
> > //// Controller
> >        def create
> >            if   @announcement.save!
> >               �[email protected]
> >            end
> >       end
>
> > ///// Model.rb
>
> >  def urgent
> >     mail(:urgent_announcement, :subject => "Urgent Announcement for "
> > + self.school.school_name)
> >  end
>
> > def mail(action, params)
> >    from = "[email protected]"
> >    to = "[email protected]"
> >   �...@cc = Array.new
> >   �...@cc << [email protected]"
> >   �...@cc << "[email protected]"
>
> >      PersonMailer.dispatch_and_deliver(action, params.merge(:from =>
> > from, :to => to, :cc => @cc ), self )
> > end
> >      I have tried like this. Its going only for  "To" and its not
> > going for CC and Bcc.
>
> >     Can we specify cc and bcc in the dispatch_and_deliver ?
>
> Yes - however if my recollection is right about the mailer internals it
> doesn't support multiple recipients which is I think where your problem may
> be.
>
> Try setting cc to a single email address (as a string) rather than an array
> of strings to check this.
>
> If this is indeed the case but you do want to send to multiple recipients,
> then the code at:
>
> http://gist.github.com/121364
>
> might help out.  Not tested but it should work if you require it in
> the Merb::BootLoader.before_app_loads block in init.rb.
>
> Hope this helps
>
> roovo
>
> --
> roovoweb.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"merb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
For more options, visit this group at http://groups.google.com/group/merb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to