Skip to content

Instantly share code, notes, and snippets.

@coderberry
Created March 30, 2009 22:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save coderberry/87922 to your computer and use it in GitHub Desktop.
Save coderberry/87922 to your computer and use it in GitHub Desktop.
class Website2 < ActionMailer::Base
def load_settings
options = YAML.load_file("#{RAILS_ROOT}/config/action_mailer.yml")[RAILS_ENV]["website2"]
@@smtp_settings = {
:address => options["address"],
:port => options["port"],
:domain => options["domain"],
:authentication => options["authentication"],
:user_name => options["user_name"],
:password => options["password"]
}
end
def welcome_email(recipient, sent_at = Time.now)
load_settings
@subject = 'Thank you for visiting website 2'
@recipients = RAILS_ENV == "production" ? recipient : "cavneb@gmail.com"
@from = 'info@mysupercooldomain.com'
@sent_on = sent_at
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment