title: A sender (Return-Path, Sender or From) required to send a message
body: <p>I am trying to send email from action mailer with delayed_job gem in rails.
  I am calling method of action mailer from after_create callbacks</p>
  
  <p>in demo model</p>
  
  <pre><code>after_create :send_mail
  def send_mail
    DemoMailer.to_client( self).deliver
  end
  </code></pre>
  
  <p>in demo_mailer</p>
  
  <pre><code>def to_client( demo)
    @demo = demo
    mail(:to =&gt; demo.email, :subject =&gt; "Confirmation")
  end
  handle_asynchronously :to_client
  </code></pre>
  
  <p>it shows an error</p>
  
  <pre><code>ArgumentError in DemosController#create
  
  A sender (Return-Path, Sender or From) required to send a message
  </code></pre>
  
  <p>then I change</p>
  
  <pre><code>def send_mail
    DemoMailer.to_client( self).deliver
  end
  </code></pre>
  
  <p>to</p>
  
  <pre><code>def send_mail
    DemoMailer.delay.to_client( self)
  end
  </code></pre>
  
  <p>it did not show any error but I did not get any mail also.</p>