成功安装了action_mailer_optional_tls以使用GMail发送? [英] successfully installed action_mailer_optional_tls to send using GMail?

查看:60
本文介绍了成功安装了action_mailer_optional_tls以使用GMail发送?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为Rails 2.3.2和Ruby 1.8.6安装了action_mailer_optional_tls,并且我无法让ActionMailer发送电子邮件!



我得到以下错误:


530 5.7.0必须首先发出STARTTLS
命令

悲伤...任何人都有成功?

解决方案

什么是在你的environment.rb文件中配置tls设置?这是我使用的:

  config.action_mailer.smtp_settings = {
:tls => true,
:address => smtp.gmail.com,
:port => 587,
:domain => mydomain.com,
:user_name => user@mydomain.com,
:password => mypassword,
:authentication => :login
}

我的应用程序运行时没有问题使用该gem rails 2.3.2

I installed action_mailer_optional_tls for Rails 2.3.2 and Ruby 1.8.6 and I cannot get ActionMailer to send email!

I get the following error:

530 5.7.0 Must issue a STARTTLS command first

Sadness...anyone had success?

解决方案

What is in your environment.rb file to configure the tls settings? This is what I'm using:

config.action_mailer.smtp_settings = { 
  :tls => true,
  :address => "smtp.gmail.com",
  :port => "587",
  :domain => "mydomain.com", 
  :user_name => "user@mydomain.com", 
  :password => "mypassword", 
  :authentication => :login
}

I've had no problems using that gem in my application running under rails 2.3.2

这篇关于成功安装了action_mailer_optional_tls以使用GMail发送?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆