Tobia,

Don't you have to use m.setCharset('ISO8859-1') instead of m.setCharset('utf-8') ?

Regards,
Lionel

Tobia a ecrit le 30/01/07 13:37:
I have a flowscript that handles a simple contact form, sending an email
for each successful submit:


var form = new Form('cocoon:/contact.form')
form.showForm('contact.jx')
var fields = getFormFields(form)

var m = cocoon.getComponent(Packages.org.apache.cocoon.mail.MailSender.ROLE)
m.setSmtpHost('mail.whatever.com')
m.setFrom('"' + fields.name + '" <' + fields.email + '>')
m.setTo('[EMAIL PROTECTED]')
m.setSubject(fields.subject)
m.setBody('Web message:\n\n' + fields.message)
m.send()


The problem is that non-ASCII characters get mangled somewhere in the
process.

Typing "à/è/ì/ò/ù" in the Message field results in an email with the
text "à /è/ì/ò/ù", as if it was converted from ISO8859-1 to UTF-8
one time too much.

I tried adding  m.setCharset('utf-8')  to the flowscript, to no effect.

Any idea?


Tobia

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to