简体   繁体   中英

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

Some email not delivered using ROR(ruby on rails 3) production environment. We are using apache + passsenger to run our application on all development and production environments. We are trigger some email on X actions on our site. 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. 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.

Rendered user_mailer/warehouse_daily_orders_email.erb (538.7ms) Sent mail to abc@gmail.com (2890ms)

Rendered user_mailer/warehouse_daily_orders_email.erb (0.1ms) Sent mail to abc@gmail.com (1536ms)

Rendered user_mailer/warehouse_daily_orders_email.erb (0.1ms) Sent mail to abc@gmail.com (1753ms)

Rendered user_mailer/warehouse_daily_orders_email.erb (0.2ms) Sent mail to abc@gmail.com (30013ms)

You should handle this deliver procedure in background. Why don't you use delayed_job to deliver mail?

Here is a tutorial on RailsCast to implement this.

It'll resolve your problem.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM