简体   繁体   English

使用ROR(ruby on rails)生产环境未发送某些电子邮件

[英]Some email not delivered using ROR(ruby on rails 3) production environment

Some email not delivered using ROR(ruby on rails 3) production environment. 某些电子邮件未使用ROR(ruby on rail 3)生产环境传递。 We are using apache + passsenger to run our application on all development and production environments. 我们正在使用apache + passsenger在所有开发和生产环境上运行我们的应用程序。 We are trigger some email on X actions on our site. 我们正在触发有关我们网站上X操作的一些电子邮件。 on dev server all email are currently delivered properly. 目前在开发服务器上,所有电子邮件均已正确发送。 but Somehow production some email are not delivered to the recipient. 但是以某种方式无法将某些电子邮件发送给收件人。

we are using gmail as smtp. 我们正在使用gmail作为smtp。 production log says that email has been out from server and render the html on server Below is the log The rails log also shows the mail being sent without any issue. 生产日志显示电子邮件已经从服务器中发出,并在服务器上呈现html。下面是日志。rails日志还显示了正在发送的邮件,没有任何问题。

Rendered user_mailer/warehouse_daily_orders_email.erb (538.7ms) Sent mail to abc@gmail.com (2890ms) 呈现的user_mailer / warehouse_daily_orders_email.erb(538.7ms)已发送邮件到abc@gmail.com(2890ms)

Rendered user_mailer/warehouse_daily_orders_email.erb (0.1ms) Sent mail to abc@gmail.com (1536ms) 呈现的user_mailer / warehouse_daily_orders_email.erb(0.1ms)已发送邮件到abc@gmail.com(1536ms)

Rendered user_mailer/warehouse_daily_orders_email.erb (0.1ms) Sent mail to abc@gmail.com (1753ms) 呈现的user_mailer / warehouse_daily_orders_email.erb(0.1ms)已发送邮件到abc@gmail.com(1753ms)

Rendered user_mailer/warehouse_daily_orders_email.erb (0.2ms) Sent mail to abc@gmail.com (30013ms) 呈现的user_mailer / warehouse_daily_orders_email.erb(0.2ms)已将邮件发送到abc@gmail.com(30013ms)

You should handle this deliver procedure in background. 您应该在后台处理此传递过程。 Why don't you use delayed_job to deliver mail? 您为什么不使用delayed_job传递邮件?

Here is a tutorial on RailsCast to implement this. 这是有关实现此目标的RailsCast 教程

It'll resolve your problem. 它会解决您的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在红宝石中,为什么某些控制器在生产环境中不起作用? - In ruby on rails, why some controller does not work in the production environment? 在 ROR 生产环境中使用 sendgrid api 密钥设置电子邮件在电子邮件中生成不同的链接 - Email setting using sendgrid api key in ROR production environment generate diffrent link in email PHP / Ruby on Rails SMTP Email 验证或检查是否已发送邮件 - PHP / Ruby on Rails SMTP Email Validation or check mail delivered or not Rails 3 - 生产环境 - smtp电子邮件问题 - Rails 3 - Production environment - smtp email issue Ruby on Rails:生产环境的详细错误日志 - Ruby on Rails : Detailed error logs for a production environment 生产环境中的Solr初始化失败,并且在轨道上有红宝石 - Solr Initialization failure in production environment with ruby on rails Rails始终使用生产环境 - Rails always using production environment Ruby on Rails - 在生产中没有收到“欢迎电子邮件” - Ruby on Rails - Not receiving 'Welcome Email' in Production Ruby独立脚本中的RoR环境 - RoR environment in Ruby standalone script ruby on rails:heroku:“生产”环境缺少“secret_key_base” - ruby on rails: heroku: Missing `secret_key_base` for 'production' environment
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM