5 Replies Latest reply on Mar 5, 2010 10:09 PM by Oleg Golitsin

    iPhone doesn't show attachments in the emails generated with m:attachment

    Oleg Golitsin Newbie

      I do not know is it a bug of iPhone or Seam or something else but the problem is in the following that the emails with pdf attachments are opened by iPhone without attachments.


      Here is the simple test example with a pdf attachment:


      <m:message xmlns="http://www.w3.org/1999/xhtml"
                 xmlns:m="http://jboss.com/products/seam/mail"
                 xmlns:h="http://java.sun.com/jsf/html"
                 xmlns:f="http://java.sun.com/jsf/core"
                 xmlns:ui="http://java.sun.com/jsf/facelets"
                 xmlns:s="http://jboss.com/products/seam/taglib"
                 xmlns:p="http://jboss.com/products/seam/pdf"
                 xmlns:c="http://java.sun.com/jstl/core"
                 charset="UTF-8">   
      <m:header name="X-Sent-From" value="JBoss Seam"/>
      <m:from name="noreply" address="noreply@test.com"/> 
      <m:to address="email@test.com"/> 
      <m:subject><h:outputText value="Test msg" /></m:subject> 
      <m:attachment fileName="tiny.pdf">
          <p:document>                                                     
              A very tiny PDF                                                                                               
          </p:document>
      </m:attachment>
      <m:body>
      <p>
         Test
      </p>
      </m:body>
      </m:message>

      iPhone shows the paper clip for such messages in the list but when the message is opened the attachments are gone or hidden. Probably there is something wrong in the format of the message (at least from the iPhone's point of view :) ) but how to solve this issue?


      Moving m:attachment block inside the m:body and/or adding disposition="inline" and contentType="application/pdf" to the m:attachment does not help.