This project is archived and is in readonly mode.

#2863 ✓stale

AchtionMailer Multipart w/ Attachment issues

Reported by aegas | July 2nd, 2009 @ 06:45 PM | in 3.x


sendings emails as the railsguide shows here:

results in getting emails contending ONLY the Attachment, the raw mail still contents all parts.

Im not the only person having that troubles, i asked in several forums, all i got was confusion.

i created the same thing in php via phpmailer, and noticed differences between the rails and php generated headers.

and i see differences..

Content-Type: multipart/alternative;


--b2_aa902415515527cc9b89965adf0d486b Content-Type: text/plain; charset = "utf-8" Content-Transfer-Encoding: 8bit
..the text..
--b2_aa902415515527cc9b89965adf0d486b Content-Type: text/html; charset = "utf-8" Content-Transfer-Encoding: 8bit
--b2_aa902415515527cc9b89965adf0d486b-- --b1_aa902415515527cc9b89965adf0d486b Content-Type: application/pdf; name="test.pdf" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="test.pdf"
..base64isch code here.. --b1_aa902415515527cc9b89965adf0d486b--
Rails headers: --mimepart_4a4cefd3abb15_7ebd3f8723f58f041213 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: Quoted-printable Content-Disposition: inline
--mimepart_4a4cefd3abb15_7ebd3f8723f58f041213 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: Quoted-printable Content-Disposition: inline
..the displays me the htmlcode again here...
--mimepart_4a4cefd3abb15_7ebd3f8723f58f041213 Content-Type: application/pdf Content-Transfer-Encoding: Base64 Content-Disposition: attachment
the ttachment, unnamed.. --mimepart_4a4cefd3abb15_7ebd3f8723f58f041213--

so we see 2 mimeparts boundarys in php, in rails its diferent, right? (just guessing)

besindes to that, the plainpart is gone here.

my code to send the railsmail:

Comments and changes to this ticket

  • Jeremy Kemper

    Jeremy Kemper May 4th, 2010 @ 06:48 PM

    • Milestone changed from 2.x to 3.x
  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 04:50 PM

    • State changed from “new” to “open”
    • Tag changed from 2.3.2, action_mailer, mailer, multipart to 232, action_mailer, mailer, multipart

    This issue has been automatically marked as stale because it has not been commented on for at least three months.

    The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.

    Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.

  • Santiago Pastorino

    Santiago Pastorino February 2nd, 2011 @ 04:50 PM

    • State changed from “open” to “stale”

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket