簡體   English   中英

電子郵件未在Rails上使用ruby發送

[英]Email is Not Sent using ruby on rails

它寫在發送郵件的控制台中,但我在收件箱中找不到任何內容。

    Sent mail to abo_salah_2010@hotmail.com (5.2ms)
Date: Thu, 27 Mar 2014 15:53:51 +0200
To: abo_salah_2010@hotmail.com
Message-ID: <53342d6f7e8_12f7c8dfe832535@salah-Dell-System-XPS-L502X.mail>
Subject: Request Accepted by the Carrier
Mime-Version: 1.0
Content-Type: text/plain;
 charset=UTF-8
Content-Transfer-Encoding: 7bit

NewsletterMailer#weekly

Hi, find me in app/views/app/views/newsletter_mailer/weekly.text.erb

=> #<Mail::Message:32171900, Multipart: false, Headers: <Date: Thu, 27 Mar 2014 15:53:51 +0200>, <To: abo_salah_2010@hotmail.com>, <Message-ID: <53342d6f7e8_12f7c8dfe832535@salah-Dell-System-XPS-L502X.mail>>, <Subject: Request Accepted by the Carrier>, <Mime-Version: 1.0>, <Content-Type: text/plain>, <Content-Transfer-Encoding: 7bit>>
irb(main):002:0> 

這是配置:

    ShipmeProj::Application.configure do
  config.action_mailer.default_url_options = { host: "localhost:3000" }
  config.action_mailer.raise_delivery_errors = true
  config.action_mailer.delivery_method = :smtp
  config.action_mailer.smtp_settings = {
  address: "smtp.gmail.com",
  port: 587,
  domain: "localhost:3000",
  authentication: "plain",
  enable_starttls_auto: true,
  user_name: ENV["xxxxx@gmail.com"],
  password: ENV["xxxxx"]

您缺少配置:

config.action_mailer.perform_deliveries = true  

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM