Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>According to the api docs for <a href="http://api.rubyonrails.org/classes/ActionMailer/Base.html" rel="nofollow">ActionMailer::Base</a>, if multiple template types are used, all of them are rendered and the mime-type is automatically set to multipart/alternative.</p> <p>If you add an attachment, the attachment is placed inside a multipart/mixed container.</p> <p>First question: Are you rendering other types such as text and html? I would not recommend sending out emails with just a pdf part. Even if the text and html parts simply instruct the recipient to open the attachment, they should be there. Ideally, there would be more information in the text/html parts.</p> <p>Second, are you trying to view the pdf inline, and not as an attachment?</p> <p>Can you take a look at the raw source of the email and update your post with the structure you're seeing? There will be an initial mime type set in the header. it will look something like this:</p> <pre><code>Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="--==_mimepart_50596418be947_c7223fec9d834d3874256"; charset=UTF-8 Content-Transfer-Encoding: 7bit </code></pre> <p>This says the parts to follow are not alternative versions of the same information, but instead instruct the email client to display them distinctly.</p> <p>Later on in the email, your text and html parts should proceeded by something like:</p> <pre><code>----==_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 </code></pre> <p>And finally, the encoded pdf part should have a mime header like:</p> <pre><code>----==_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 </code></pre> <p>With a simple test email I just sent to 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 lets me download the pdf.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload