[英]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.