AR_Mailer - Emailer Actions

View as text

class EmailActions < ActionMailer::ARMailer

 contact_recipient = ''
 
 def signup_notification(recipient)
   setup
   @subject = "To you"
   @from = "blomqudl@uwec.edu"
   @recipients = "blomqudl@uwec.edu"
 end
 
 def activation
   setup
   @subject = 'Your account has been activated!'
   @body  = "http://"
 end
 
 def create
   Email.new()
 end
 
 protected
 
 # Loads the configuration file and configures ActionMailer
 def setup  
   c = YAML::load(File.open("#{RAILS_ROOT}/config/config.yml")) 
   ActionMailer::Base.smtp_settings = {
     :address  => c[RAILS_ENV]['email']['server'],
     :port  => c[RAILS_ENV]['email']['port'], 
     :domain  => c[RAILS_ENV]['email']['domain'],
     :authentication => c[RAILS_ENV]['email']['authentication'],
     :user_name => c[RAILS_ENV]['email']['username'],
     :password => c[RAILS_ENV]['email']['password']
   } 
 end
 
end
Original snippet written by Dustin Blomquist
Last updated at 11:02 AM on Jul 07, 2008

SnippetStash costs money to host and develop. The service is free for everyone to use
but if you found it useful please consider making a small donation.