According to the api docs for ActionMailer :: Base , if several types of templates are used, all of them are displayed, and the mime type is automatically set to multipart / alternative.
If you add an attachment, the attachment is placed inside the multipart / mixed container.
First question: Do you show other types like text and html? I would not recommend sending emails with just a pdf part. Even if parts of the text and html simply instruct the recipient to open the attachment, they should be there. Ideally, there will be more information in parts of the text / html.
Secondly, are you trying to view a pdf file, not as an attachment?
Can you take a look at the original source of the email message and update the message with the structure you see? The header will set the initial mime type. it will look something like this:
Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="--==_mimepart_50596418be947_c7223fec9d834d3874256"; charset=UTF-8 Content-Transfer-Encoding: 7bit
This suggests that the parts to be observed are not alternative versions of the same information, but instead instruct the mail client to display them clearly.
Later in the email, your texts and html parts should be done as follows:
----==_mimepart_50596418be947_c7223fec9d834d3874256 Date: Wed, 19 Sep 2012 06:20:12 +0000 Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="--==_mimepart_50596418be468_c7223fec9d834d38741a5"; charset=UTF-8 Content-Transfer-Encoding: 7bit
And finally, the encoded pdf part should have a mime header, for example:
----==_mimepart_50596418be947_c7223fec9d834d3874256 Date: Wed, 19 Sep 2012 06:20:12 +0000 Mime-Version: 1.0 Content-Type: application/pdf; charset=UTF-8; filename=terms.pdf Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=terms.pdf
With a simple test email, I just sent myself with text, html parts and a large pdf, I can view the email on my iphone. It shows the html part and an icon that allows you to download a pdf file.