Back to vBulletin 3.6 Add-ons

vMail Converter - Send out your emails in different encoding
Mod Version: 1.2.0, by Milad

This modification is in the archives.
vB Version: 3.6.4 Rating: (3 votes - 3.67 average) Installs: 30
Released: 05 Apr 2007 Last Update: 17 May 2007 Downloads: 173
Not Supported Code Changes  

By http://www.syrianmeds.net/ & http://www.milado.net/

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 http://www.gnu.org/software/libiconv/#introduction.
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.

Download

This modification is archived, downloads are still allowed.

File Type: %1$s product-vmail_converter.xml (1.6 KB, 109 downloads)

Similar Mods

Board Optimization vMail Converter - Send out your emails in different encoding vBulletin 3.7 Add-ons

vblts.ru supports vBulletin®, 2022-2024