当我尝试通过联系表单发送电子邮件时,我得到一个OpenSSL :: SSL :: SSLError.
在我的config/application.rb中,我已经添加了.
config.action_mailer.raise_delivery_errors = true
config.action_mailer.delivery_method = :smtp
ActionMailer::Base.smtp_settings = {
:address => "mail.vinderhimlen.dk",
:port => 587,
:user_name => "asd@vinderhimlen.dk",
:password => "x",
:authentication => :login
}
Run Code Online (Sandbox Code Playgroud)
我的表格:
<%= simple_form_for [@support], :url => { :action => "create" }, :html => { :method => :post } do |f| %>
<%= f.input :sender_name, :label => 'Navn' %>
<%= f.input :email, :label => 'E-mail' %>
<%= f.input :support_type, :collection => ['Feedback', 'Idé', "Rapporter fejl", 'Business', 'Andet'], :prompt => "Valg …Run Code Online (Sandbox Code Playgroud)