Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vMail Converter - Send out your emails in different encoding Details »»
vMail Converter - Send out your emails in different encoding
Version: 1.2.0, by Milad Milad is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Board Optimization - Version: 3.6.4 Rating:
Released: 04-04-2007 Last Update: 05-16-2007 Installs: 30
Code Changes  
No support by the author.


Introduction:
In order to solve the problem with unicode (UTF-8) in some Email Service Providers (such as Hotmail, Yahoo and many others), I created this product.
It converts the sent out messages only, from your real encoding into an encoding of choice, both encodings, the source & destination must be supported by iconv.
You may know, I had converted to UTF-8 and faced this problem, now it's solved.

Caution:
This product is provided As Is without warranties.

Requirements:
  • vBulletin 3.6.4+
  • iconv PHP extension is installed on your system, or your PHP version is 5 and above.

Supported Encodings:
See http://www.gnu.org/software/libiconv/#introduction

Installation or Upgrading:
  1. Import the product file product-vmail_converter.xml (Choose Yes when Upgrade).
  2. Go to vBulletin Options -> Email Options -> vMail Converter - Destination Encoding.
  3. Set your Destination Encoding and save (For me, It's windows-1256).
  4. In /includes/class_mail.php Replace every
    PHP Code:
    $stylevar['charset'
    WITH
    PHP Code:
    $this->get_charset() 
  5. In /includes/class_mail.php Find
    PHP Code:
        function start($toemail$subject$message$from ''$uheaders ''$username '')
        { 
    Add after:

    PHP Code:
            // vMail Converter START
            
    $subject $this->vmail_convert($subject);
            
    $message $this->vmail_convert($message);
            
    // vMail Converter END 
  6. In /includes/class_mail.php Find again
    PHP Code:
        function start($toemail$subject$message$from ''$uheaders ''$username '')
        { 
    Add before:
    PHP Code:
        // vMail Converter START
        
    function vmail_convert($item)
        {
            global 
    $stylevar;
            
            if (
    function_exists('iconv') AND $item != '')
            {
                return @
    iconv($stylevar['charset'], $this->registry->options['vmail_converter_destination'], $item);
            }
            else
            {
                return 
    $item;
            }
        }
        
        function 
    get_charset()
        {
            global 
    $stylevar;
            
            if (
    function_exists('iconv'))
            {
                return 
    $this->registry->options['vmail_converter_destination'];
            }
            else
            {
                return 
    $stylevar['charset'];
            }
        }
        
    // vMail Converter END 
  7. In /includes/class_mail.php Find twice
    PHP Code:
                $mailfromname $this->encode_email_header(unhtmlspecialchars($mailfromname$unicode_decode), $encoding); 
    Add before
    PHP Code:
                // vMail Converter START
                
    $mailfromname $this->vmail_convert($mailfromname);
                
    // vMail Converter END 
  8. In /includes/class_mail.php Find
    PHP Code:
    $fromemail $from
    Add before
    PHP Code:
                // vMail Converter START
                
    $from $this->vmail_convert($from);
                
    // vMail Converter END 
    Save and upload the file again.
  9. You're done.

Known issues:
  • none.

Versions:
  • 1.0.0 (initial release). (5. April 2007)
  • 1.1.0 (10. April 2007)
  • 1.1.1 (11. April 2007) fix a bug
  • 1.2.0 (17. May 2007) Very good version, every bug fixed.

Support is given for who clicks "install" only.
Mark it as "Installed" to receive updates and support.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #42  
Old 07-08-2007, 08:18 AM
Fenriz Fenriz is offline
 
Join Date: Aug 2002
Posts: 126
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've just installed this hack. I have vb 3.6.7pl1, utf8 charset. I followed all the instractions, but it's not working! I receive only the heaer and beginning of the message. When it would be converted foreign text I have blank..
I can send you the file class_mail.php, sure the problem somewhere here.
Reply With Quote
  #43  
Old 07-08-2007, 02:59 PM
Milad's Avatar
Milad Milad is offline
 
Join Date: Apr 2005
Location: Syro
Posts: 663
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just make sure you apply those changes to a fresh class_mail.php file.

Also make sure you upgrade the product using the final xml version.

Regards
Reply With Quote
  #44  
Old 08-25-2007, 12:17 PM
ahmedeldeep's Avatar
ahmedeldeep ahmedeldeep is offline
 
Join Date: Jun 2007
Location: Egypt
Posts: 55
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

very nice Milad
but i think this problem not found now with new versions
Reply With Quote
  #45  
Old 08-29-2007, 08:54 AM
nahhh3075 nahhh3075 is offline
 
Join Date: May 2007
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

GoDaddy hosting company isn't supporting iconv.
is there no way to use this mod if the hosting company not supporting iconv?? i'm so upset when my members complaining that the email is broken.
Reply With Quote
  #46  
Old 08-29-2007, 10:33 AM
Milad's Avatar
Milad Milad is offline
 
Join Date: Apr 2005
Location: Syro
Posts: 663
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No there is no way!
Reply With Quote
  #47  
Old 08-29-2007, 12:08 PM
nahhh3075 nahhh3075 is offline
 
Join Date: May 2007
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Milad View Post
No there is no way!
crap, i SO regret to use GODADDY!!!!!
not only this iconv but the crappy customer service!
Reply With Quote
  #48  
Old 08-31-2007, 10:46 AM
nahhh3075 nahhh3075 is offline
 
Join Date: May 2007
Posts: 8
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well, now i'm testing in different hosting company....
the contents and the e-mail sender name are not broken and readable but the e-mail subject is broken.

=?utf-8?q?=27_=BF=C2=B6=F3=C0=CE=B0=D4=C0=D3=2C_=C0=DA=B 5=BF=BB=E7=B3=C9=2C_=B0=D4=C0= D3=C0=AF=C6=BF=B8=AE=C6=BC=2C_=B8=C5=C5=A9=B7=CE=2 C_=B9=AB=B7=E1=B0=F8=C0=AF_=27 =C0=C7_=B5=EE=B7=CF=C8=B8=BF=F8=C0=CC_=B5=C7=B1=E2 =C0=A7=C7=D1_=B8=B6=C1=F6=B8=B 7_=B0=FA=C1=A4=C0=D4=B4=CF=B4=D9!?=‏

like this... any suggestion please?
Reply With Quote
  #49  
Old 09-01-2007, 03:47 AM
Milad's Avatar
Milad Milad is offline
 
Join Date: Apr 2005
Location: Syro
Posts: 663
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
=?utf-8?q?=27_=BF=C2=B6=F3=C0=CE=B0=D4=C0=D3=2C_=C0=DA=B 5=BF=BB=E7=B3=C9=2C_=B0=D4=C0= D3=C0=AF=C6=BF=B8=AE=C6=BC=2C_=B8=C5=C5=A9=B7=CE=2 C_=B9=AB=B7=E1=B0=F8=C0=AF_=27 =C0=C7_=B5=EE=B7=CF=C8=B8=BF=F8=C0=CC_=B5=C7=B1=E2 =C0=A7=C7=D1_=B8=B6=C1=F6=B8=B 7_=B0=FA=C1=A4=C0=D4=B4=CF=B4=D9!?=
This is encoded subject. you can't read it in a plain text. but email programs and sites should decode the title and present the correct string.
Reply With Quote
  #50  
Old 05-01-2008, 11:51 PM
mhmd1983 mhmd1983 is offline
 
Join Date: Apr 2007
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

milad , you're a life saver man
Reply With Quote
  #51  
Old 05-02-2008, 12:25 AM
Milad's Avatar
Milad Milad is offline
 
Join Date: Apr 2005
Location: Syro
Posts: 663
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by mhmd1983 View Post
milad , you're a life saver man
I've always been like that!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:14 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.14415 seconds
  • Memory Usage 2,336KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (10)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete