You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by bu...@apache.org on 2005/02/09 11:55:28 UTC
DO NOT REPLY [Bug 33462] New: -
Weird Encoding problem with SendMailAction
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=33462>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.
http://issues.apache.org/bugzilla/show_bug.cgi?id=33462
Summary: Weird Encoding problem with SendMailAction
Product: Cocoon 2
Version: 2.1.6
Platform: PC
OS/Version: Windows XP
Status: NEW
Severity: normal
Priority: P2
Component: blocks
AssignedTo: dev@cocoon.apache.org
ReportedBy: gabriel.gruber@workflow.at
I have a flowscript, wich uses the sendmailaction to send a mail.
As the mail is supposed to be a html-mail, it is generated through a cocoon-
pipeline and feeded by a request-param which contains the body-text.
this body-text is first submitted by a cform.
the cform correctly delivers the bodytext (after changing all the encoding
settings in the web.xml and serializer configs to "UTF-8") with
specialcharacters correctly.
However the mail which is generated doesn't encode the bodytext correctly. the
weird thing is that when I submit the same URL I gave to the SendMailaction via
a browser, the character-encoding is correct.
when looking at the following sourcecode, then Bodytext should logically be
encoded with UTF-8 (as everything else is done with UTF-8). However in order to
work, I had to switch to ISO-8859-1 for this single line. Otherwise the
generated html-mail had strange special characters..
var cocoonurl = "cocoon:/mailtext/arllink/" + myarl + "?body=" +
java.net.URLEncoder.encode(model.KollegeEmailBodytext,"ISO-8859-1");
var mailsender = cocoon.getComponent
(Packages.org.apache.cocoon.mail.MailSender.ROLE);
mailsender.setSmtpHost(cocoon.parameters["eohb_smtp_host"],cocoon.parameters
["eohb_smtp_user"],cocoon.parameters["eohb_smtp_pwd"]);
mailsender.setTo(model.KollegeEmail);
mailsender.setFrom(cocoon.parameters["eohb_smtp_from"]);
mailsender.setBodyFromSrc(cocoonurl);
mailsender.setSubject("eOHB Link");
mailsender.setCharset("UTF-8");
mailsender.setBodyFromSrcMimeType("text/html; charset=utf-8");
mailsender.sendIt();
--
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.