title: Sidekiq: Pass email body and attachments for processing?
body: <p>I just learned/started using Sidekiq today to handle background processing of incoming email messages and attachments, but am a bit lost on the best way to get the email body and attachments into the worker for processing.</p>
  
  <p>My RoR app is hosted on Heroku and receives incoming emails via Mailgun to a controller, which then kicks off my worker.  Within the worker is a call to a 3rd party API to upload my email messages and attachments (think DropBox.)</p>
  
  <p>Mailgun pre-parses everything and sends it over as parameters, but from what I understand about Sidekiq, I don't want to pass along entire objects such as the email body and/or attachments as shown here.</p>
  
  <pre><code>@attach_count = params["attachment-count"]
  @from = params["from"]
  @subject = params["subject"]
  @msgbody = params["body-html"]
  ProcessEmailWorker.perform_async(@id, @attach_count, @from, @subject, @msgbody) 
  </code></pre>
  
  <p>What's the best practice for getting these items over to my worker?</p>