If I need send some letter to 2 people, how can I do this? I found docs in web, but I don't understand them, can开发者_开发百科 you show me and explain me using simple language?
def send_mail_persons(user)
  @user = user
  mail :to => @user.email, :subject => "Amusement.", :from => MAIL_ADDRESS
end
Here i have called the method send_mail_persons and passed the recipients info as a parameter.Also there is a simple way..
def send_mail_persons
  mail :to => MAILING_ADDRESS, :subject => "Amusement.", :from => MAIL_ADDRESS
end
and define both MAILING_ADDRESS and MAIL_ADDRESS in the constants.
Thanx
Best you can find is Ryan's Railscast:
http://railscasts.com/episodes/206-action-mailer-in-rails-3
Also good guide is here:
http://guides.rubyonrails.org/action_mailer_basics.html
Actually you can read there not just about ActionMailer but about whole Rails kitchen.
 
         
                                         
                                         
                                         
                                        ![Interactive visualization of a graph in python [closed]](https://www.devze.com/res/2023/04-10/09/92d32fe8c0d22fb96bd6f6e8b7d1f457.gif) 
                                         
                                         
                                         
                                         加载中,请稍侯......
 加载中,请稍侯......
      
精彩评论