-1
郵件發送到垃圾郵件文件夾。我不明白這個問題。郵件發送到垃圾郵件在ROR
郵件Confirgation
# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false
config.action_mailer.perform_deliveries = true
config.action_mailer.default_url_options = { :host => 'localhost:3000' }
#config/environments/development.rb
config.action_mailer.default :charset => "utf-8"
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:openssl_verify_mode => 'none',
address: 'vps103.spsnetwork.net',
port: 25,
domain: 'mail.forestbankfoundation.org',
authentication: :login,
enable_starttls_auto: true,
user_name: '[email protected]',
password: '********'
}
梅勒行動
class NewsLetterMailer < ActionMailer::Base
def newsletter_email(newsletter)
@newsletter = newsletter
mail(from: "[email protected]", to: @newsletter.email, subject: "New Letter For FBF Registartion", body: " Hello #{@newsletter.name} \n :Email: #{@newsletter.email}, \n Thank You For Registration Our News Letter")
end
end
有人能想出解決辦法。我不明白爲什麼會發生這種情況?