PDA

View Full Version : Board Optimization - vMail Converter - Send out your emails in different encoding


Milad
04-04-2007, 10:00 PM
By Syrian Medical Society (http://www.syrianmeds.net/) & Milad (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 iconv (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:

Import the product file product-vmail_converter.xml (Choose Yes when Upgrade).
Go to vBulletin Options -> Email Options -> vMail Converter - Destination Encoding.
Set your Destination Encoding and save (For me, It's windows-1256).
In /includes/class_mail.php Replace every
$stylevar['charset']
WITH
$this->get_charset()

In /includes/class_mail.php Find
function start($toemail, $subject, $message, $from = '', $uheaders = '', $username = '')
{

Add after:

// vMail Converter START
$subject = $this->vmail_convert($subject);
$message = $this->vmail_convert($message);
// vMail Converter END

In /includes/class_mail.php Find again
function start($toemail, $subject, $message, $from = '', $uheaders = '', $username = '')
{

Add before:
// 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

In /includes/class_mail.php Find twice
$mailfromname = $this->encode_email_header(unhtmlspecialchars($mailfromna me, $unicode_decode), $encoding);

Add before
// vMail Converter START
$mailfromname = $this->vmail_convert($mailfromname);
// vMail Converter END

In /includes/class_mail.php Find
$fromemail = $from;
Add before
// vMail Converter START
$from = $this->vmail_convert($from);
// vMail Converter END
Save and upload the file again.
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.

Omranic
04-05-2007, 04:06 AM
Its the missing Jewel.
Yes, nothing impossible.

thanks very much Milad.

Now testing & I'll return with the feed back

Omranic
04-05-2007, 04:39 AM
works fine for me.
can you determine the fle edits to convert subject & mailfromname (if empty)?

Milad
04-05-2007, 04:54 AM
Yes, I can, just wait for me tomorrow.

Omranic
04-05-2007, 04:57 AM
I appreciate your work.

waiting.

spy90000
04-05-2007, 05:26 AM
Its the missing Jewel.
Yes, nothing impossible.

thanks very much Milad.


بصراحة ما عندي شيء ازيده على هذا. ;)

One thing, should I changes the encoding in main VB-Lang file also, or it doesn't matter.

bela-meaad
04-05-2007, 08:20 AM
you are a Hero

thats what i`m looking for


Thanks
Milad ;)

Almotmaiz.Net
04-05-2007, 10:04 AM
Nice word Milad .. ^_^

i'll test hack .. I'll return with the feedback

Thanx Milad ..\\\

Losha
04-05-2007, 11:44 AM
روعه يا أخى والله
جزاك الله خيرا
Its the missing Jewel.
Yes, nothing impossible.

thanks very much Milad.

NeWNoKiA
04-05-2007, 01:45 PM
This Milad

You are a good Developer

bey

jwaany
04-05-2007, 06:31 PM
Good work ...

thanks ..

Milad
04-06-2007, 11:19 PM
Thank you guys.

I won't publish file edits right now, because I'm trying to do it via plug-ins, so be patient please.

Regards.

Omranic
04-07-2007, 06:46 AM
Thank you guys.

I won't publish file edits right now, because I'm trying to do it via plug-ins, so be patient please.

Regards.
Is it possible to be done via plugins?
I have looked hooks around & didn't reach any starting point.

Milad
04-08-2007, 01:33 PM
Is it possible to be done via plugins?
I have looked hooks around & didn't reach any starting point.
Yes, it could be done via plug-ins, I have a good view, I'll publish it when I'm done.

Subah
04-08-2007, 04:54 PM
Thanks , but its not help in my problem :(

jozief mx
04-09-2007, 02:22 PM
and me
i recevied the mail empety and mush timr i receved the languge not good

وكمان معي احيانا بيوصلني البريد فاضي واحيانا مرمز مثل هيك
أƒأ¤أٹ أٹأ“أٹأ،أ£ أ¥أگأ‡ أ‡أ،أˆأ‘أ+أڈ أ‡أ،أ…أ،أںأٹأ‘أ¦أ¤أ+ أ،أƒأ¤ أڑأ¤أ¦أ‡أ¤ أˆأ‘أ+أڈأں أ‡أ،أ…أ،أںأٹأ‘أ¦أ¤أ+ أƒأڈأژأ، أںأ…أژأٹأˆأ‡أ‘ أ،أ،أˆأ‘أ+أڈ أ‡أ،أ…أ،أںأٹأ‘أ¦أ¤أ+ أ+أ+ أ‡أ،أ£أٹأچأ‡أˆأ¦أ¤ أ+أ+ أ‡أ،أ،أ¥.

أ‡أ،أژأکأ¦أ‰ أ‡أ،أƒأ¦أ،أ¬ أ£أ¤ أˆأ‘أ¤أ‡أ£أŒ أ…أژأٹأˆأ‡أ‘ أ‡أ،أˆأ‘أ+أڈ أ¥أگأ‡ أ‡أںأٹأ£أ،أٹ. أ¦أ£أڑ أ¥أگأ‡, أ…أژأٹأˆأ‡أ‘ أ‡أ،أٹأ¥أ+أ†أ‰ أ،أ‡ أ+أ’أ‡أ، أ–أ‘أ¦أ‘أ+أ‡أ°:

أ¤أ¥أ‡أ+أ‰ أ‡أ،أ+أ+أ‘أ‰.
أ¤أ¥أ‡أ+أ‰ أ“أکأ‘ أ£أ+أ‘أڈ.

أ¤أ¥أ‡أ+أ‰ أ+أ+أ‘أ‰ أƒأژأ‘أ¬.
أ¤أ¥أ‡أ+أ‰ أ“أکأ‘ أ£أ+أ‘أڈ.
أ¤أ¥أ‡أ+أ‰ أ“أکأ‘ أ£أ+أ‘أڈ.

Milad
04-10-2007, 10:19 AM
I have just released new version.

Subah
04-10-2007, 05:33 PM
Still not fix my arabic problem !!!

alforqan2
04-11-2007, 09:17 AM
im update 2 the new relase and the prplem not goinge:mad:

Milad
04-11-2007, 11:05 AM
Come in guys. your problems won't be solved if you set down there and say I have a problem.

Please describe your problem and circumstances.

Thanks

Milad
04-11-2007, 11:06 AM
and me
i recevied the mail empety and mush timr i receved the languge not good

وكمان معي احيانا بيوصلني البريد فاضي واحيانا مرمز مثل هيك
أ?أ?أٹ أٹأ?أٹأ،أ? أ?أگأ? أ?أ،أ?أ?أ+أڈ أ?أ،أ?أ،أںأٹأ?أ?أ?أ+ أ،أ?أ? أڑأ?أ?أ?أ? أ?أ?أ+أڈأں أ?أ،أ?أ،أںأٹأ?أ?أ?أ+ أ?أڈأژأ، أںأ?أژأٹأ?أ?أ? أ،أ،أ?أ?أ+أڈ أ?أ،أ?أ،أںأٹأ?أ?أ?أ+ أ+أ+ أ?أ،أ?أٹأچأ?أ?أ?أ? أ+أ+ أ?أ،أ،أ?.

أ?أ،أژأکأ?أ? أ?أ،أ?أ?أ،أ? أ?أ? أ?أ?أ?أ?أ?أ? أ?أژأٹأ?أ?أ? أ?أ،أ?أ?أ+أڈ أ?أگأ? أ?أںأٹأ?أ،أٹ. أ?أ?أڑ أ?أگأ?, أ?أژأٹأ?أ?أ? أ?أ،أٹأ?أ+أ?أ? أ،أ? أ+أ?أ?أ، أ?أ?أ?أ?أ+أ?أ?:

أ?أ?أ?أ+أ? أ?أ،أ+أ+أ?أ?.
أ?أ?أ?أ+أ? أ?أکأ? أ?أ+أ?أڈ.

أ?أ?أ?أ+أ? أ+أ+أ?أ? أ?أژأ?أ?.
أ?أ?أ?أ+أ? أ?أکأ? أ?أ+أ?أڈ.
أ?أ?أ?أ+أ? أ?أکأ? أ?أ+أ?أڈ.
Make sure that you have the correct setting for the hack.

Milad
04-11-2007, 12:11 PM
1.1.1 (11. April 2007) fix a bug

jozief mx
04-12-2007, 09:10 AM
i will now test the new relase and tell you

jozief mx
04-12-2007, 12:36 PM
not work

Milad
04-16-2007, 01:32 AM
Is iconv installed on your system?
Do you configure the hack properly?

jozief mx
04-18-2007, 04:27 AM
Is iconv installed on your system?
YES
Do you configure the hack properly
LIKE WHAT

Milad
04-19-2007, 02:26 AM
like:

vBulletin Options -> Email Options -> vMail Converter - Destination Encoding.

jozief mx
04-19-2007, 04:25 AM
yes and i but
windows-1256

Gsmdenis
04-19-2007, 06:29 AM
super nice for this , keep it on

Milad
04-19-2007, 03:39 PM
Is your forum encoding utf-8?

jozief mx
04-19-2007, 04:22 PM
how i can now that

almqdad
04-20-2007, 03:22 PM
Hello

I have the same problem that jozief mx have . this happened because bluehost

did some thing to php encoding

I think the mod will not solve the problem

jozief mx
04-22-2007, 04:24 PM
BlueHost he have a puplice proplem with this

i have my frined he is custmer in blue host and he have Ipb forums and he fexed the some word in php.ini and the proplem its fixed but i edit the some word in php.ini and the proplem not sloved meby the Ipb he working good with php languge

t-roz
04-29-2007, 05:47 AM
thnx for the hack bro but still the same :(

t-roz
05-11-2007, 04:57 PM
i have also blue host account so it will never be solved??

Atsuko
05-12-2007, 10:17 AM
Thank you very much for making this hack.

I am using Japanese in utf-8, and by using this (Destination Encoding is also utf-8),
only the sender's name can not be fixed.

Would you please advice for fixing this?

perfphysio
05-12-2007, 12:36 PM
Will this assist with the large amount of mail that goes astray or is blocked for user comfirmation email to ISP's such as *@yahoo.in

If so I'll download and install it today :)

Milad
05-13-2007, 09:18 AM
new version will be released to fix everything except the blue host problem which I don't now what it is.

perfphysio
05-13-2007, 09:25 AM
OK, please let us know when the new version is ready for download. thanks a lot

Milad
05-17-2007, 03:19 PM
Hello everyone

I has just released the final version 1.2.0 of vMail converter, I had tested it for a pretty while, and I think it's off bugs.

Best regards

Fenriz
07-08-2007, 08:18 AM
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.

Milad
07-08-2007, 02:59 PM
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

ahmedeldeep
08-25-2007, 12:17 PM
very nice Milad
but i think this problem not found now with new versions

nahhh3075
08-29-2007, 08:54 AM
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.

Milad
08-29-2007, 10:33 AM
No there is no way!

nahhh3075
08-29-2007, 12:08 PM
No there is no way!

crap, i SO regret to use GODADDY!!!!!
not only this iconv but the crappy customer service!

nahhh3075
08-31-2007, 10:46 AM
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?

Milad
09-01-2007, 03:47 AM
=?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.

mhmd1983
05-01-2008, 11:51 PM
milad , you're a life saver man

Milad
05-02-2008, 12:25 AM
milad , you're a life saver man
I've always been like that!

matrex722
09-17-2010, 10:15 AM
$fromemail = $from;

this is not in v 3.8.5