Actionmailer“ Timeout :: Error”有问题吗? [英] problem with Actionmailer "Timeout::Error"?
问题描述
im尝试发送带有操作邮件的电子邮件,它给了我 Timeout :: Error(执行已过期):
,即使在控制台中它说电子邮件已发送:
它显示
im trying to send a email with action mailer and it gives me a Timeout::Error (execution expired):
even though in the console it says that the e mail is sent:
it shows
Sent mail to aldeirm2@gmail.com
然后显示发送的电子邮件,然后显示以下错误:
then displayes the e mail that was sent then it shows the following error:
Timeout::Error (execution expired):
/usr/lib/ruby/1.8/timeout.rb:60:in `open'
/usr/lib/ruby/1.8/net/smtp.rb:551:in `do_start'
/usr/lib/ruby/1.8/net/smtp.rb:551:in `do_start'
/usr/lib/ruby/1.8/net/smtp.rb:525:in `start'
app/models/appointment.rb:10:in `tomorrows_appointments'
app/models/appointment.rb:8:in `each'
app/models/appointment.rb:8:in `tomorrows_appointments'
app/controllers/show_appointments_controller.rb:11:in `send_email'
-e:2:in `load'
-e:2
Rendered rescues/_trace (35.8ms)
Rendered rescues/_request_and_response (0.3ms)
Rendering rescues/layout (internal_server_error)
这是我的设置:
config.cache_classes = false
config.whiny_nils = true
config.action_controller.consider_all_requests_local = true
config.action_view.debug_rjs = true
config.action_controller.perform_caching = false
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:enable_starttls_auto => true,
:address => "smtp.gmail.com",
:port => 587,
:domian => "gmail.com",
:authentication => :login,
:user_name => "username",
:password => "blablabla",
}
我也尝试设置身份验证
到:plain
,并毫无希望地将username@gmail.com用作 user_name
。
i also tried setting authentication
to :plain
and using username@gmail.com as the user_name
with no hope.
任何想法
推荐答案
我在那里看到一个错字:您写了
:domian => gmail.com,
I saw a typo there: you wrote :domian => "gmail.com",
而不是
:domain => gmail.com,
:domain => "gmail.com",
这篇关于Actionmailer“ Timeout :: Error”有问题吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!