This page is READ-ONLY. It is generated from the old site.
All timestamps are relative to 2013 (when this page is generated).
If you are looking for TeX support, please go to VietTUG.org

Problem #502

Asynchronous Email Delivery

Added by over 3 years ago. Updated about 3 years ago.

Status: Closed Start Date: 13-10-2009
Priority: High Due date:
Assigned to: - % Done:

100%

Category: redmine: email system
Target version: 2.0.0 Estimated time: 4.00 hours
Resolution: Fixed
Votes: 0/2

Description


Related issues

related to Dragula System - Problem #469: không thể gửi quá nhiều mail Closed 08-09-2009 14-11-2009
related to Dragula System - Problem #346: Đổi trường FRom khi gửi mail thông báo Closed 20-03-2009 31-03-2009

History

Updated by over 3 years ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100
  • Resolution set to Fixed

Patch file: ./config/initializers/35-async-mail.rb (note: 40-mail.rb loads action_mailer settings from email.yml and turns deliveries on if configuration file is found.)

 1 ###
 2 ### http://viettug.org/issues/show/502
 3 ### http://redmineblog.com/articles/asynchronous-email-delivery/
 4 ###
 5 
 6 # Adds :async_smtp and :async_sendmail delivery methods
 7 # to perform email deliveries asynchronously
 8 module AsynchronousMailer
 9   %w(smtp sendmail).each do |type|
10     define_method("perform_delivery_async_#{type}") do |mail|
11       Thread.start do
12         send "perform_delivery_#{type}", mail
13       end      
14     end
15   end
16 end
17 
18 ActionMailer::Base.send :include, AsynchronousMailer

Updated by over 3 years ago

    Nhớ chỉnh trong email.yml:

    production:
      delivery_method: :async_smtp