【问题标题】:Sending email using sendgird使用 sendgrid 发送电子邮件
【发布时间】:2011-11-02 09:48:57
【问题描述】:

我正在尝试使用 sendgrid 发送电子邮件。邮件已送达,但当我检查时,内容不见了。

我按照 sendgrid 提供的说明进行操作。

-config.action_mailer.delivery_method = :smtp

-编辑配置/环境.rb

ActionMailer::Base.smtp_settings = {
:address => "smtp.sendgrid.net",
:port => '25',
:domain => "halo.dev",
:authentication => :plain,
:user_name => "account",
:password => "password"
}

邮件可以成功发送。但是,它只显示

from    halo@halo.net via sendgrid.me 
to  user@user.com
date    Wed, Nov 2, 2011 at 5:23 PM
mailed-by   sendgrid.me
signed-by   sendgrid.me

没有显示内容 html

我尝试过的:

  1. 将电子邮件作为文件发送(即 config.action_mailer.delivery_method = :file)它工作正常。我在本地得到了文件

  2. 使用程序本身发送电子邮件(即 config.action_mailer.delivery_method = :sendmail)它也可以正常工作。当我检查电子邮件时,一切正常。

【问题讨论】:

    标签: ruby-on-rails sendgrid


    【解决方案1】:

    尝试在您的 Sendgrid 帐户中打开电子邮件模板应用程序。

    【讨论】:

      猜你喜欢
      • 2018-11-08
      • 2021-10-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-08-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多