[jbossseam-issues] [JBoss JIRA] Commented: (JBSEAM-770) Gmail displays alternative text part

Frank Lieb. (JIRA) jira-events at lists.jboss.org
Fri Feb 9 05:27:40 EST 2007


    [ http://jira.jboss.com/jira/browse/JBSEAM-770?page=comments#action_12352702 ] 
            
Frank Lieb. commented on JBSEAM-770:
------------------------------------

Peter, I'm not sure if I understood your answer correctly. What I did try, is to add a custom Content-Disposition-header using the m:header tag. The sample facelet looks like:

<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" importance="low"
	requestReadReceipt="false">
	<m:header name="X-Sent-From" value="JBoss Seam" />
	<m:header name="Content-Disposition" value="inline" />
	<m:from name="Seam" address="frank at example.com" />
	<m:to name="#{person.firstname} #{person.lastname}">#{person.address}</m:to>
	<m:subject>Seam Mail</m:subject>
	<m:body>
		<html>
		<body>
		<p><h:outputText value="Dear #{person.firstname}" />,</p>
		<p>You can try out Seam by visiting <a
			href="http://labs.jboss.com/jbossseam">http://labs.jboss.com/jbossseam</a>.</p>
		<p>Regards,</p>
		<p>Peter</p>
		</body>
		</html>
		<f:facet name="alternative">This text will be skipped as it is outside the h:outputText tag
            <h:outputText>This is the alternative text body for mail readers that don't support html</h:outputText>
		</f:facet>
	</m:body>
</m:message>

The debug output of JavaMail is:

To: fr a <frank at .........>
Message-ID: <31649197.11171016042694.JavaMail. at ....>
Subject: Seam Mail
MIME-Version: 1.0
Content-Type: multipart/mixed; 
	boundary="----=_Part_2_30705996.1171016042684"
X-Priority: 5
Priority: Non-urgent
Importance: low
X-Sent-From: JBoss Seam
Content-Disposition: inline

------=_Part_2_30705996.1171016042684
Content-Type: multipart/alternative; 
	boundary="----=_Part_3_8514003.1171016042694"

------=_Part_3_8514003.1171016042694
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit


		<html>
		<body>
		<p>Dear fr,</p>
		<p>You can try out Seam by visiting <a href="http://labs.jboss.com/jbossseam">http://labs.jboss.com/jbossseam</a>.</p>
		<p>Regards,</p>
		<p>Peter</p>
		</body>
		</html>
------=_Part_3_8514003.1171016042694
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

This is the alternative text body for mail readers that don't support html
------=_Part_3_8514003.1171016042694--

------=_Part_2_30705996.1171016042684--

.

And for both clients, Thunderbird and Gmail, I receive only the alternative text again. If I view the source code of the message, the HTML code is still included. I used Seam 1.1.6 and Thunderbird 1.5.0.9
cheers, Frank


> Gmail displays alternative text part
> ------------------------------------
>
>                 Key: JBSEAM-770
>                 URL: http://jira.jboss.com/jira/browse/JBSEAM-770
>             Project: JBoss Seam
>          Issue Type: Bug
>          Components: Mail
>    Affects Versions: 1.1.5.GA
>            Reporter: Peter Muir
>         Assigned To: Peter Muir
>             Fix For: 1.1.7.GA
>
>
> If you add a alternative multipart to a mimemessage it should only display in mail clients which don't support html (e.g. pine).  In the current impl this works for Pine (text) and Outlook (html) but not in gmail (text).  Not sure whether this is gmail or Seam.  Should test other mail clients and see how they behave, see if gmail interprets other multipart/alternative mails correctly and possibly read the spec.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list