Forums / General / Accents in email problem

Accents in email problem

Author Message

Benoit Schumacher

Monday 23 March 2009 4:21:09 am

Hi,

I have been trying all sorts of things to fix the email bugs from emails sent after a form submission but no success so far.

Can anyone help me ?

this is an example of the mail content received:

----

L'information suivante a C)tC) collectC)e:
PrC)nom, nom:
test

Sujet:
Contact depuis ehl.edu - L'C)cole

Message:
tetsasdf C)C)C)a sfC C C

df

---

all accents are converted into C) and I have not been able to figure out why and where to fix this problem.

I have tried changing the mail type to "text/html" in the ini files, in the ezMail class file. Have also tried the Content-Transfer-encode with base64 and quoted-printable but no change.

the source code of the email is:

----

MIME-Version: 1.0
Content-Type: multipart/mixed;boundary===Multipart_Boundary_0e498d2107a83dd35e071b7aa6ab620f; charset=utf-8
Content-Transfer-Encoding: base64
Content-Disposition: inline
User-Agent: eZ Publish, Version 4.0.0
Status:

--==Multipart_Boundary_0e498d2107a83dd35e071b7aa6ab620f
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

L'information suivante a C)tC) collectC)e:
PrC)nom, nom:
test

Sujet:
Contact depuis ehl.edu - L'C)cole

Message:
tetsasdf C)C)C)a sfC C C

df

Email:
*my email is here*
--==Multipart_Boundary_0e49

---

I am not sure what is going as, as there is multipart, but no html part ?

I installed an extension to allow file uploads (enhancedbinaryfile), could this have anything to do with it ?

thanks for any help given.

Jean-Yves Zinsou

Monday 23 March 2009 5:54:24 am

Hi there,

have you tried html notation in those templates (é->é, è->à) ?

Do Androids Dream of Electric Sheep?
I dream of eZpubliSheep....
------------------------------------------------------------------------
http://www.alma.fr

Yannick Komotir

Monday 23 March 2009 9:36:34 am

Looking at by your admin siteacces (in ini configuration) that in your template.ini and in your site.ini the selected charset is utf-8.

<|- Software Engineer @ eZ Publish developpers -|>
@ http://twitter.com/yannixk

Steven E. Bailey

Monday 23 March 2009 11:02:11 pm

You have read this thread?

http://projects.ez.no/enhancedezbinaryfile/forum/general/works_fine_but

What is your mail client?

You are using the enhancedbinaryfile type, right?

Certified eZPublish developer
http://ez.no/certification/verify/396111

Available for ezpublish troubleshooting, hosting and custom extension development: http://www.leidentech.com

Benoit Schumacher

Wednesday 25 March 2009 2:55:35 am

I havent read that post, thanks.

Will try some of the mentioned ideas, but dont think it will fix anything based on what users have replied.

Furthermore, the problem of accents occurs for any form sent, whether it uses an enhanedbinaryfile or not field. All emails have the multipart, I imagine that is because the kernel file was modified for the extension, and all emails are sent using a multipart ?

I have utf-8 set in all places.

Mail client used outlook and thunderbird, havent tried in others.

Do you know in which kernel or other file I can find the php code that generates the body content of the email ? I havent found that, and Im not sure how eZpublish templates generate the mail content.
I could possibly use php and a preg_replace or something to convert certain characters if I knew where to edit.

thanks for the help so far.

Steven E. Bailey

Wednesday 25 March 2009 5:12:00 am

This won't help with this problem but that really should (come to think of it) only be sending a multipart message if it is a multipart message. I'll change that in the code.

Certified eZPublish developer
http://ez.no/certification/verify/396111

Available for ezpublish troubleshooting, hosting and custom extension development: http://www.leidentech.com

Steven E. Bailey

Wednesday 25 March 2009 5:17:07 am

Also, it's the
$templateResult = $tpl->fetch( 'design:content/collectedinfomail/' . $informationCollectionTemplate . '.tpl' );

$mail->setBody( $templateResult );

in collectinformation.php that is creating the mail. If you do a preg_replace on the $templateResult before the setBody that should work.

Certified eZPublish developer
http://ez.no/certification/verify/396111

Available for ezpublish troubleshooting, hosting and custom extension development: http://www.leidentech.com

Benoit Schumacher

Tuesday 31 March 2009 1:44:29 am

Thanks for the help.

I decided to simply not modifiy the kernel file, so there is not attachment with the mail, but just a link to the file in the message content. This fixes the accents problems and suits my clients needs for the time being.