title: Sending huge CSV file as attachment in mail, I am getting very late response and sometimes request gets timeout
body: <p>I am having about 30,000 of orders(records).
  And from controller i send an email with CSV of orders(records) using Delayed Job for background processing. Code is like -</p>
  
  <pre><code>OrderNotifier.delay.send_orders_csv(current_user, arranged_orders)
  </code></pre>
  
  <p>And in mailer -</p>
  
  <pre><code>  def send_orders_csv(logged_in_user, orders)
       @user = logged_in_user
       attachments['orders.csv'] = { mime_type: 'text/csv', content: Order.orders_csv(logged_in_user, orders) }
       mail(to: logged_in_user.email, subject: 'Orders CSV')
    end
  </code></pre>
  
  <p>And when it inserts row into Delayed::Job it takes a lot time because there are almost 30,000 of records that i need to send as CSV attachment.
  I have tried with increasing delayed_job workers. But it didn't resolve it.</p>
  
  <p>How can i send an email with the huge amount of records in CSV file at once?</p>