From c927aa0fd25ce26b147e9e28aa6ea52bf1d87f00 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 16 Dec 2004 17:53:19 +0000 Subject: Updated documentation git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@195 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionmailer/lib/action_mailer/base.rb | 51 ++++++++++++++++++++-------------- 1 file changed, 30 insertions(+), 21 deletions(-) (limited to 'actionmailer') diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index 5ca463ddf8..25dc6b2654 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -26,24 +26,41 @@ module ActionMailer #:nodoc: # # ApplicationMailer.create_comment_notification(david, hello_world) # => a tmail object # ApplicationMailer.deliver_comment_notification(david, hello_world) # sends the email + # + # = Configuration options + # + # These options are specified on the class level, like ActionMailer::Base.template_root = "/my/templates" + # + # * template_root - template root determines the base from which template references will be made. + # + # * logger - the logger is used for generating information on the mailing run if available. + # Can be set to nil for no logging. Compatible with both Ruby's own Logger and Log4r loggers. + # + # * server_settings - Allows detailed configuration of the server: + # * :address Allows you to use a remote mail server. Just change it away from it's default "localhost" setting. + # * :port On the off change that your mail server doesn't run on port 25, you can change it. + # * :domain If you need to specify a HELO domain, you can do it here. + # * :user_name If your mail server requires authentication, set the username and password in these two settings. + # * :password If your mail server requires authentication, set the username and password in these two settings. + # * :authentication If your mail server requires authentication, you need to specify the authentication type here. + # This is a symbol and one of :plain, :login, :cram_md5 + # + # * raise_delivery_errors - whether or not errors should be raised if the email fails to be delivered. + # + # * delivery_method - Defines a delivery method. Possible values are :smtp (default), :sendmail, and :test. + # Sendmail is assumed to be present at "/usr/sbin/sendmail". + # + # * perform_deliveries - Determines whether deliver_* methods are actually carried out. By default they are, + # but this can be turned off to help functional testing. + # + # * deliveries - Keeps an array of all the emails sent out through the Action Mailer with delivery_method :test. Most useful + # for unit and functional testing. class Base - private_class_method :new + private_class_method :new #:nodoc: - # Template root determines the base from which template references will be made. cattr_accessor :template_root - - # The logger is used for generating information on the mailing run if available. - # Can be set to nil for no logging. Compatible with both Ruby's own Logger and Log4r loggers. cattr_accessor :logger - # Allows detailed configuration of the server: - # * :address Allows you to use a remote mail server. Just change it away from it's default "localhost" setting. - # * :port On the off change that your mail server doesn't run on port 25, you can change it. - # * :domain If you need to specify a HELO domain, you can do it here. - # * :user_name If your mail server requires authentication, set the username and password in these two settings. - # * :password If your mail server requires authentication, set the username and password in these two settings. - # * :authentication If your mail server requires authentication, you need to specify the authentication type here. - # This is a symbol and one of :plain, :login, :cram_md5 @@server_settings = { :address => "localhost", :port => 25, @@ -54,23 +71,15 @@ module ActionMailer #:nodoc: } cattr_accessor :server_settings - - # Whether or not errors should be raised if the email fails to be delivered @@raise_delivery_errors = true cattr_accessor :raise_delivery_errors - # Defines a delivery method. Possible values are :smtp (default), :sendmail, and :test. - # Sendmail is assumed to be present at "/usr/sbin/sendmail". @@delivery_method = :smtp cattr_accessor :delivery_method - # Determines whether deliver_* methods are actually carried out. By default they are, - # but this can be turned off to help functional testing. @@perform_deliveries = true cattr_accessor :perform_deliveries - # Keeps an array of all the emails sent out through the Action Mailer with delivery_method :test. Most useful - # for unit and functional testing. @@deliveries = [] cattr_accessor :deliveries -- cgit v1.2.3