<?xml version="1.0" encoding="UTF-8"?>
<issue>
  <id>613</id>
  <project name="Redmine" id="1"/>
  <tracker name="Patch" id="3"/>
  <status name="Closed" id="5"/>
  <priority name="Low" id="3"/>
  <author name="eneko taberna" id="306"/>
  <category name="Email notifications" id="9"/>
  <fixed_version name="0.9.0" id="6"/>
  <subject>Asynchronous email delivery</subject>
  <description>As suggested at http://www.datanoise.com/articles/2006/7/14/asynchronous-email-delivery , the email delivery delay experienced by users can be almost eliminated creating a new Thread to handle the delivery.

This code at the public part of Mailer.rb model is the most simplistic way to achieve it :

@alias_method :old_deliver, :deliver! unless method_defined?(:old_deliver)

def deliver!()
      Thread.start(mail) do |email|
         old_deliver
      end
end@
</description>
  <start_date>2008-02-06</start_date>
  <due_date></due_date>
  <done_ratio>0</done_ratio>
  <estimated_hours></estimated_hours>
  <created_on>Wed Feb 06 12:44:53 +0100 2008</created_on>
  <updated_on>Sat Mar 07 17:45:40 +0100 2009</updated_on>
  <journals>
    <journal id="7897">
      <user name="Jean-Philippe Lang" id="1"/>
      <notes>Added in r2339. Use :async_smtp instead of :smtp to enable asynchronous email delivery.</notes>
      <details>
        <detail old="1" name="status_id" property="attr" new="5"/>
        <detail old="" name="fixed_version_id" property="attr" new="6"/>
      </details>
    </journal>
  </journals>
</issue>
