Bug 23858

Summary: message type should allow types other than "text" or "html", to support GBK encoding
Product: Taglibs Reporter: Bin Sun <sun2bin>
Component: Mailer TaglibAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED FIXED    
Severity: normal CC: martinc, tivv
Priority: P3 Keywords: PatchAvailable
Version: 1.1   
Target Milestone: ---   
Hardware: Other   
OS: other   
Attachments: Patches to resolve this issue.

Description Bin Sun 2003-10-16 09:05:08 UTC
I can't use mailer taglib to send mails with GBK encoding. This forced me to 
send pure English mail to my customers who could only read Chinese mails.

I found the source code fragment:
 * $Header: /home/cvs/jakarta-
taglibs/mailer/src/org/apache/taglibs/mailer/MailTag.java,v 1.9 2002/10/31 
05:01:27 glenn Exp $

line 738~743:
    public final void setType(String value) {
	if (value.equalsIgnoreCase("html"))
	    type = "text/html";
	else
	    type = "text/plain";
    }

this restricted the message type only two options: "text/html", "text/plain"

But I do need "text/html;charset=GBK"!
Comment 1 Martin Cooper 2003-12-10 07:29:57 UTC
Created attachment 9484 [details]
Patches to resolve this issue.
Comment 2 Martin Cooper 2003-12-10 07:33:27 UTC
Added patches to support the addition of a 'charset' attribute to the <message> 
tag, to explicitly add a character set to the message content type.
Comment 3 Martin Cooper 2003-12-10 07:39:55 UTC
*** Bug 18614 has been marked as a duplicate of this bug. ***
Comment 4 Martin Cooper 2004-01-29 06:18:42 UTC
Fixed in the 20040129 nightly build.