Search The ForumSearch   RegisterRegister  LoginLogin

MailBee POP3

 AfterLogic Forum : MailBee POP3
Subject Topic: Handle different codepages Post ReplyPost New Topic
Author
Message << Prev Topic | Next Topic >>
waxby
Newbie
Newbie


Joined: 23 September 2005
Location: Sweden
Online Status: Offline
Posts: 1
Posted: 23 September 2005 at 4:39pm | IP Logged Quote waxby

Hi !
I'm very pleased with Mailbee POP3 and SMTP that I have used to build my support system.

Now I can not figure out how to manage e-mail with different codepages.

I have a pop3.asp that receives and stores all bodytext into a database, when I show a message from the database, I just write
response.write rs("body") without any tricks.

When I started to get mail in greek I tested to set the pop3 codepage property to 1253, and english, swedish and greek worked ok until today. I received a greek mail, that was not understandable at all... Found that for example greek can have 2 different codepages...

Now I wounder how to make my pop3 to work for all different kinds of codepages, since I do not know the codepage before I process the email.

Thanks in advance

Best regards
Micael Wäxby
Back to Top View waxby's Profile Search for other posts by waxby
 
Alex
AfterLogic Support
AfterLogic Support
Avatar

Joined: 19 November 2003
Online Status: Offline
Posts: 2206
Posted: 23 September 2005 at 5:05pm | IP Logged Quote Alex

You may consider using UTF-8 codepage. That is, you will be able to display mails composed with different charsets.

You can tell MailBee to convert everything in UTF-8 using the code like below:
Code:

POP3.CodepageMode=0
POP3.Codepage=65001

' Now you can receive mail..
Set Msg = POP3.RetrieveSingleMessage(1)


Message bodies and headers will be UTF-8 encoded.

Later, when displaying the message on ASP page, you should set
<% Response.Charset="utf-8" %>
at the top of the page. This will set HTTP header which tells browser that the content is UTF-8.

However, if the mail is HTML, it could also have charset specified in META tag. You should remove it or replace with utf-8 (for example, using regular expressions) because otherwise the browser would use META tag setting despite Response.Charset is set.

Example of META tag:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">


Note: recently, there were important enhancements to UTF-8 support in MailBee. Please download and install the latest version of MailBee.dll in order to have complete UTF-8 functionality:
http://www.afterlogic.com/updates/mailbee.zip

Regards,
Alex
Back to Top View Alex's Profile Search for other posts by Alex
 

If you wish to post a reply to this topic you must first login
If you are not already registered you must first register

  Post ReplyPost New Topic
Printable version Printable version

Forum Jump

Powered by Web Wiz Forums version 7.9
Copyright ©2001-2004 Web Wiz Guide