Home
Ruby on Rails
Cheatsheets
ActionMailer is configured by acessing configuration methods at the class level, for example, ActionMailer::Base.template_root = "/my/templates". These methods allow you to define the overall settings to be used by your application whenever it invokes ActionMailer. Define these settings in your config/environment.rb file using config.action_mailer.method_name_here. If you require different settings for each of your Rails' environments, define settings separately via config/environments.
|
smtp_settings = {hash} |
|
|
sendmail_settings = {hash} |
|
|
raise_delivery_errors = true or false |
Whether or not errors should be raised if the email fails to be delivered. |
|
delivery_method = :smtp, :sendmail or :test |
Defines a delivery method, defaults to |
|
perform_deliveries = true or false |
Determines whether deliver_* methods are actually carried out. By default they are, but this can be turned off to help functional testing. |
|
template_root = "/path" |
The root from which template references will be made |
|
logger |
Used for generation information on the mailing run if available. Can be set to |
|
default_charset = "string" |
the default charset used for the body and to encode the subject. Defaults to |
|
default_mime_version = "string" |
The default mime version used for the message. Defaults to |
|
default_implicit_parts_order = [array] |
When an email is built implicitly, this variable controls how the parts are ordered. Defaults to |
|
default_content_type = "string" |
The default content type used for the main part of the message. Defaults to |