我試圖通過使用Action Mailer和Googlemail-SMTP服務器的rails發送郵件,但它不起作用。我究竟做錯了什麼?Rails Action Mailer不發送郵件
下面是我用(我也嘗試了當地的中繼服務器,而無需認證也沒有工作)的配置:
# Action Mailer config
config.action_mailer.smtp_settings = {
# Gmail Account
:tls => true,
:address => "smtp.googlemail.com",
:port => "587",
:domain => "localhost",
:authentication => :plain,
:user_name => "[email protected]",
:password => "dsgdes"
config.action_mailer.delivery_method = :smtp
config.action_mailer.perform_deliveries = true
config.action_mailer.raise_delivery_errors = false
config.action_mailer.default_url_options = { :host => "localhost:80" }
config.action_mailer.default_charset = "utf-8"