Php photo gallery TWG | JFUploader | TWG Flash upload | WFU | Forum

Get help for TinyWebGallery, the best image gallery. The forum is also home for the Joomla JFUploader, TWG Flash Uploader and the Wordpress flash uploader.
It is currently 29. Mar 2024, 08:51

This forum is readonly now. Please use the new forum if you don't find the answer to your question here. The new forum is at https://www.tinywebgallery.com/blog/forum/


All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 2 posts ] 
Author Message
PostPosted: 8. Dec 2009, 18:36 
Offline

Joined: 6. Dec 2009, 09:55
Posts: 9
Location: Lithuania, Kaunas
I've entered some Lithuanian translation... And couldn't see characters correctly in email messages (TWG v1.7.8.1).
Not sure whether it can be called as bug, or feature request :)
But as this gallery can be pretty well localized - I assume this feature is a must :)

Editing two files solved my problems (user registering email for notifications and admin sending those notifications). I haven't tried selfregistration module yet.

i_email_user.php (ln93):
change
Code:
        if ($enable_email_sending) {
            if (!@mail ($email, html_entity_decode ($lang_email_subscribemail_subject), html_entity_decode (str_replace("\n", "\r\n", $lang_email_subscribemail)), $submailheaders)) {
                $localmessage = $lang_email_error_send_mail;
to:
Code:
        if ($enable_email_sending) {
            if (!@mail ($email, '=?UTF-8?B?'.base64_encode(html_entity_decode($lang_email_subscribemail_subject)).'?=', html_entity_decode(str_replace("\n", "\r\n", $lang_email_subscribemail)), $submailheaders.'MIME-Version: 1.0' . "\n" . 'Content-type: text/plain; charset=UTF-8' . "\n")) {
                $localmessage = $lang_email_error_send_mail;
In particular - the following code added:
if (!@mail ($email, '=?UTF-8?B?'.base64_encode(html_entity_decode($lang_email_subscribemail_subject)).'?=', html_entity_decode(str_replace("\n", "\r\n", $lang_email_subscribemail)), $submailheaders.'MIME-Version: 1.0' . "\n" . 'Content-type: text/plain; charset=UTF-8' . "\n"))

email_admin.php (ln161):
change
Code:
          if ($enable_email_sending) {
            mail ($l, $subject, str_replace("\n", "\r\n", $message . $end), $mailheaders);
          }
to:
Code:
          if ($enable_email_sending) {
            mail ($l, '=?UTF-8?B?'.base64_encode($subject).'?=', str_replace("\n", "\r\n", $message . $end), $mailheaders.'MIME-Version: 1.0' . "\n" . 'Content-type: text/plain; charset=UTF-8' . "\n");
          }
In particular - the following code added:
if ($enable_email_sending) {
mail ($l, '=?UTF-8?B?'.base64_encode($subject).'?=', str_replace("\n", "\r\n", $message . $end), $mailheaders.'MIME-Version: 1.0' . "\n" . 'Content-type: text/plain; charset=UTF-8' . "\n");


Tested Lithuanian characters (ĄąČ莞...) and Russian cyrilic (АаБбВвГгДд...) in both - subject and body. Seems to be OK for mail programs and providers I use :)


Top
 Profile  
 
 Post subject:
PostPosted: 8. Dec 2009, 18:42 
Offline
Site Admin
User avatar

Joined: 1. Aug 2005, 12:53
Posts: 11232
You are right - The current implementation was not sending utf-8 e-mails.

I will add this to 1.8.

- Michael


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
cron
powered by phpbb | Datenschutz/ Privacy policy