2

我得到这个错误,而试图通过Gmail发送电子邮件 - 以下不同的东西,但无济于事通过Rails 3中发送电子邮件与Gmail的问题

Net::SMTPAuthenticationError (530 5.7.0 Must issue a STARTTLS command first. pw17sm4922458lab.5 
): 
    app/controllers/contact_controller.rb:11:in `create' 

我已经试过负荷,是从生产我的设置。 rb

# Change mail delvery to either :smtp, :sendmail, :file, :test 
    config.action_mailer.delivery_method = :smtp 
    config.action_mailer.smtp_settings = { 
    address: "smtp.gmail.com", 
    port: 587, 
    domain: "bizmodev.com", 
    authentication: "plain", 
    enable_starttls_auto: true, 
    user_name: '******.*****@gmail.com', 
    password: '********' 
    } 

    # Specify what domain to use for mailer URLs 
    config.action_mailer.default_url_options = {host: "bizmo.co.uk"} 

任何有关此事的帮助,我都会很感激。

+0

这是否有帮助 - http ://productforums.google.com/forum/#!topic/apps/Sm16T9DPJ5Q – PinnyM

+0

对不起,PinnyM,这次没有帮助;) –

回答

1

确定固定的,基本上我在我的VPS安装sendmail的,然后重新启动Apache和它现在的作品 -

Ubuntu的sendmail命令行安装

apt-get install sendmail 

希望这可以帮助未来的人...

0

您可以启用STARTTLS这样的:

config.action_mailer.smtp_settings = { 
    .... 
    :enable_starttls_auto => true} 
+0

我试过了,但仍然被炸出来? –

相关问题