PDA

View Full Version : Convert email's from Win-1251 to Koi8-R


inetd
05-03-2002, 09:35 AM
I need hack which convert all automatic email's from Win-1251 to Koi8-R. Please help me :)

Sparkz
05-03-2002, 09:47 AM
As I don't know much about the mail RFC or the mail()-function in vB, this is only a wild guess.

I would imagine that you'd have to find all instances of the mail()-function and add an extra header to it, or something.

Maybe changing this:


mail($touser[email],$emailsubject,$emailmsg,"From: \"$bbtitle Mailer\" <$webmasteremail>");

to

mail($touser[email],$emailsubject,$emailmsg,"From: \"$bbtitle Mailer\" <$webmasteremail>", "Content-Type: text/plain; charset=\"koi8-r\"");


Again - this is only a wild guess

inetd
05-03-2002, 10:48 AM
Don't work
I generally don't receive emails... :(

Sparkz
05-03-2002, 10:50 AM
Hmm - that addition should, in theory, add the needed header to your email...

inetd
05-03-2002, 11:03 AM
Sparkz or other, help me. This very important for me ....

Sparkz
05-03-2002, 11:06 AM
I'd have to look closer at it, and then it'll have to wait untill later, as I am at work now.

inetd
05-08-2002, 07:41 PM
Sparkz, you don't test your suggestion?

Sparkz
05-08-2002, 08:12 PM
Sorry for not getting back earlier. It kinda slipped my mind.

It seems I made a slight mistake in my first suggestion. Try this instead:

mail($touser[email],$emailsubject,$emailmsg,"From: \"$bbtitle Mailer\" <$webmasteremail>\nContent-Type: text/plain; charset=\"koi8-r\"");


By mistake I had separated the extra headers, instead of putting them in the same parameter, like they should have been.

I have tried this one, outside of vB, and it worked fine. At least it messed up my norwegian letters :p (Which was to be expected :))

inetd
05-09-2002, 02:20 PM
Sparkz, don't convert.
I change member.php and use mailform from my vB. And message received in Win-1251