hi
attached is a raw data of an email that was sent here in synapse. im using the 
following code:
function GetTextFromPart(Msg:TMimeMess; PartType:String; OverrideChar: boolean; 
SourceChar: TMimeChar = UTF_8): string;
var Part: TMimePart;
begin
  Part := FindMimePart(Msg.MessagePart,PartType);
  if Part = nil then
  begin
    if PartType = 'text/html' then
    begin
      Result := '';
      exit;
    end;
    if Msg.MessagePart.GetSubPartCount = 0 then
      Part := Msg.MessagePart
    else
      Part := Msg.MessagePart.GetSubPart(0);
  end;
  Part.TargetCharset := UTF_8;
  if OverrideChar then
    Part.CharsetCode := SourceChar;
  Part.ForcedHTMLConvert := TRUE;
  Part.DecodePart;
  SetLength (Result, Part.DecodedLines.Size);
  Part.DecodedLines.Position := 0;
  Part.DecodedLines.Read(Result[1], Length(Result));
end;

in order to retrieve its text/plain part but the result is gibberish/chinese 
characters. in D2007 the above works perfectly but for some reason,
D2009 doesnt like it and the conversion is wrong even though the content is 
english

please advice
thanks

-- 

Attachment: rawmail.txt
Description: Attached file: rawmail.txt

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
synalist-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synalist-public

Reply via email to