Problème d'envoi de plusieurs parties mail à l'aide de ActionMailer

J'utilise le code suivant pour envoyer des e-mails dans les rails:

class InvoiceMailer < ActionMailer::Base

  def invoice(invoice)
    from          CONFIG[:email]
    recipients    invoice.email
    subject       "Bevestiging Inschrijving #{invoice.course.name}"
    content_type  "multipart/alternative"

    part "text/html" do |p|
      p.body = render_message 'invoice_html', :invoice => invoice
    end

    part "text/plain" do |p|
      p.body = render_message 'invoice_plain', :invoice => invoice
    end

    pdf = Prawn::Document.new(:page_size => 'A4')
    PDFRenderer.render_invoice(pdf, invoice)
    attachment :content_type => "application/pdf", :body => pdf.render, :filename => "factuur.pdf"

    invoice.course.course_files.each do |file|
      attachment :content_type => file.content_type, :body => File.read(file.full_path), :filename => file.filename
    end
  end

end

Il semble bien pour moi, et les e-mails s'affichent également comme elles le devraient dans le Gmail interface web. Dans le Courrier (le programme Apple), cependant, j'ai juste 1 de la pièce jointe (où il doit être 2) et il n'y a pas de texte. Je n'arrive pas à comprendre quelle en est la cause.

J'ai copié l'e-mail à partir des journaux:

 
Le courrier envoyé à [email protected] 

De: [email protected] 
Pour: [email protected] 
Sujet: Bevestiging Inschrijving Authentiek Spreken 
Mime-Version: 1.0 
Content-Type: multipart/alternative; boundary=mimepart_4a5b035ea0d4_769515bbca0ce9b412a 


--mimepart_4a5b035ea0d4_769515bbca0ce9b412a 
Content-Type: text/html; charset=utf-8 
Content-Transfer-Encoding: Quoted-printable 
Content-Disposition: inline 






Cher monsieur

= --mimepart_4a5b035ea0d4_769515bbca0ce9b412a Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: Quoted-printable Content-Disposition: inline Cher monsieur * Foo= --mimepart_4a5b035ea0d4_769515bbca0ce9b412a Content-Type: application/pdf; nom=factuur.pdf Content-Transfer-Encoding: Base64 Content-Disposition: attachment; filename=factuur.pdf JVBERi0xLjMK/////woxIDAgb2JqCjw8IC9DcmVhdG9yIChQcmf3bikkl1by b2R1Y2VyIChQcmF3bikKPj4KZW5kb2Jqcjigmcbvymokpdwgl0nvdw50idek ... ... ... MCBuIAp0cmFpbGVyCjw8IC9JbmZvIDEgmcbsci9taxplidexci9sb290idmg MCBSCj4+CnN0YXJ0eHJlZgo4Nzc1CiUlRU9GCg== --mimepart_4a5b035ea0d4_769515bbca0ce9b412a Content-Type: application/pdf; nom=Spelregels.pdf Content-Transfer-Encoding: Base64 Content-Disposition: attachment; filename=Spelregels.pdf JVBERi0xLjQNJeLjz9MNCjYgMCBvYmoNpdwvtgluzwfyaxplzcaxl0wgmjex NjYvTyA4L0UgMTY5NTIvTiAxL1QgMjEwmdavscbbidg3niaxotjdpj4nzw5k ... ... ... MDIwNzQ4IDAwMDAwIG4NCnRyYWlsZXINcjw8l1npemugnj4+DQpzdGFydHhy ZWYNCjExNg0KJSVFT0YNCg== --mimepart_4a5b035ea0d4_769515bbca0ce9b412a--