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.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 30 2025 21:47:17
Script start
Timing: Jan 30 2025 21:47:17
Module start 'layout'
Timing: Jan 30 2025 21:47:17
Module start 'content'
Timing: Jan 30 2025 21:47:17
Module end 'content'
Timing: Jan 30 2025 21:47:17
Script end

Main resources:

Total runtime0.0221 sec
Peak memory usage6,144.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0050 588.1250151.2109
Module start 'layout' 0.00500.0044 739.3359220.6719
Module start 'content' 0.00940.0114 960.00781,009.7422
Module end 'content' 0.02070.0014 1,969.750041.9922
Script end 0.0221  2,011.7422 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002611.6043140.0002
Check MTime0.00094.2892140.0001
Mysql Total
Database connection0.00073.089510.0007
Mysqli_queries0.002812.742630.0009
Looping result0.00000.073210.0000
Template Total0.00104.410.0010
Template load0.00073.274810.0007
Template processing0.00021.107010.0002
Override
Cache load0.00052.064410.0005
General
dbfile0.00031.293380.0000
String conversion0.00000.034540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs