Search the web
Sign In
New User? Sign Up
tmail2000
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Want to share photos of your group with the world? Add a group photo to Flickr.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Bugs in TMailMessage2000.   Message List  
Reply | Forward Message #766 of 798 |




Hi,

who can fix the first bug? or ideal

There are Bugs in TMailMessage2000.   Version 1.10.1 

1.  I use POP3 to get a Mail from Mail Server and put it in TMailMessage2000.

    That works fein, but if that mail contains  an Attachment, and the Attachment is also in a Mail Format, like .msg File. Then in the TMailMessage2000 there is only a File named file_0,   you can not open this file with aother Mail Client Program like Outlook or Outlook Express.! The same Problem if Attachment is a Groupwise Mail or Luto Notes Mail. Some time the Attachment is lost. 

2.  A Mail has Plaintext Body, and contains a THML File as Attachment. I have Problem with  such Mail,  if I put this Mail in  TMailMessage2000,  then the contents of the Attachment is put in the Property TextHTML, and show in the HTML Body, there is not Attachment in TMailMessage2000.

I fixed this bug with Source Code blow:

    function GetText(Info: String): Boolean;
    var
      Buffer: PChar;

    begin

      Result := False;
      if (FTextPlainPart = nil) and (FTextHTMLPart = nil) then //Z.Song 06.09.2005 Attachment should not in Body.

      begin
      if (FTextPlainPart = nil) and (Info = _T_P! ) then
      begin

    ;     if Part.Decode and (Part.Decoded.Size > 0) then
        begin

          FTextPlainPart := Part;

          GetMem(Buffer, Part.FDecoded.Size+1);
          StrLCopy(Buffer, Part.FDecoded.Memory, Part.FDecoded.Size);
          Buffer[Part.FDecoded.Size] := #0;
          FTextPlain.SetText(Buffer);
          FreeMem(Buffer);

          Result := True;
        end;
      end;

      if (FTextHTMLPart = nil) and (Info = _T_H) then
      begin

 ! nbsp;      if Part.Decode and (Part.Decoded.Size > 0) then
        begin

          FTextHTMLPart := Part;

          GetMem(Buffer, Part.FDecoded.Size+1);
          StrLCopy(Buffer, Part.FDecoded.Memory, Part.FDecoded.Size);
          Buffer[Part.FDecoded.Size] := #0;
          FTextHTML.SetText(Buffer);
          FreeMem(Buffer);

          Result := True;
        end;
      end;
      end;
    end;

  begin
 

3 problems with address! es like '"Name, Firstname" <na me@...>' (changed GetDestAddress, GetDestName).

function TMailMessage2000.GetDestAddress(Field: String; const Index: Integer): String;
var
  Address, Dests: String;
  Count, Loop: Integer;
  Quote, Clammy: Boolean;
begin
  Dests := TrimSpace(GetLabelValue(Field)); 
  Count := 0;
  Address := '';
  Quote := False;
  Clammy := False;
  for Loop := 1 to Length(Dests) do
  begin
    if Dests[Loop] = '"' then
      Quote := not Quote;
    if Dests[Loop] = '(' then         //Z.Song 07.09.05
      Clammy := True;
    if Dests[Loop] = ')' then         //Z.Song 07.09.05
      Clammy := False;
    if (not Quote) and (not Clammy) and (Dests[Loo! p] in [',', ';']) then
      Inc(Count);
    if Count > Index then
      Break;
    if Count = Index then
    begin
      if Quote then                  //Z.Song 18.03.05
        Address := Address + Dests[Loop]
      else if (not Clammy) and (not (Dests[Loop] in [',', ';', '<', '>', '[', ']', '(', ')', #32])) then
        Address := Address + Dests[Loop];
      if (Dests[Loop] = '<') and (not Quote) then
        Address := '';
      if (Dests[Loop] = '>') and (not Quote) then
        break;
  &n! bsp; end;
  end;
  Result := TrimSpace(Address);
en d;

function TMailMessage2000.GetDestName(Field: String; const Index: Integer): String;
var
  Dests: String;
  Loop: Integer;
  Count: Integer;
  Quote: Boolean;
  Name: String;

begin

  Dests := TrimSpace(GetLabelValue(Field));
  Count := 0;
  Name := '';
  Quote := False;

  for Loop := 1 to Length(Dests) do
  begin

    if Dests[Loop] = '"' then
    begin

      Quote := not Quote;
    end
    else
    begin

      if (not Quote) and (Dests[Loop] in [',', ';']) then Inc(Count);

      if Count > Index then
      begin

        Name := '';
        Break;
   &nbs! p;  end;

      if Count = Index then
      begin

        if (Dests[Loop] = '<') and (not Quote) then
        begin

          Break;
        end
        else
        begin
          if (Dests[Loop] = ')') and (not Quote) then     //Z.Song 06.09.2005
            break;                                        //Z.Song 06.09.2005

    ! ;      if (Dests[Loop] = '(') and (not Quote) then     //Z.Song 06.09.2005
            Name := ''                                    //Z.Song 06.09.2005

          else if Quote or (not (Dests[Loop] in [',', ';'])) then
            Name := Name + Dests[Loop];
        end;
      end;
    end;

    if Loop = Length(Dests) then Name := '';
  end;

  Result := DecodeLine7Bit(TrimSpace(Name));
end;

who can fix the first bug? or ideal

 give me suggestions, advices, I can do it myself.

Kind regards

Zhentao Song

 

 

  

 

     





Mit der Gruppen-SMS von WEB.DE FreeMail können Sie eine SMS an alle    
Freunde gleichzeitig schicken: http://freemail.web.de/features/?mc=021179   
   
  


Thu Sep 8, 2005 6:57 am

z.song@...
Send Email Send Email

Forward
Message #766 of 798 |
Expand Messages Author Sort by Date

Hi, who can fix the first bug? or ideal There are Bugs in TMailMessage2000. Version 1.10.1 1. I use POP3 to get a Mail from Mail Server and put it in...
Zhentao Song
z.song@...
Send Email
Sep 8, 2005
11:23 am

Hello, Zhentao. who can fix the first bug? or ideal There are Bugs in TMailMessage2000. Version 1.10.1 if that mail contains an Attachment, and the Attachment...
Kunikazu Okada
okd_okd2000
Offline Send Email
Sep 9, 2005
4:12 am

Hi, my Bugfix for the second Bug below dosn't work korrectly. with my Code I have problem, if the Email has HTML body. some one has idea? Thanks Zhentao ...
Zhentao Song
z.song@...
Send Email
Sep 13, 2005
11:08 am

"Zhentao Song" z.song@... schrieb am 07.09.05 15:24:14: 2. A Mail has Plaintext Body, and contains a THML File as Attachment. I have Problem with such Mail,...
Kunikazu Okada
okd_okd2000
Offline Send Email
Sep 14, 2005
2:20 am

Hi Okada, ... Ok, See my Attachment for your test. This email in Attachment is send from Outlook to Exchange Server. I use POP3 to get the email from Exchange...
Zhentao Song
z.song@...
Send Email
Sep 13, 2005
11:09 am

Hello, Ok, See my Attachment for your test. This email in Attachment is send from Outlook to Exchange Server. Well, I think that Exchange Server is responsible...
Kunikazu Okada
okd_okd2000
Offline Send Email
Sep 14, 2005
1:55 am

Hi Okada, thanks for your help. with your Source Code below.(Part.Parent : Part doesn't have Parent ) if (Part = Self) or ((Part.Parent=Self) and...
Zhentao Song
z.song@...
Send Email
Sep 15, 2005
6:45 pm

Hi Okada, you can try save the Attachment in a File, and then load this File in MailMessage2000. You see the Attachment ist a correct MIME Format Mail Message....
Zhentao Song
z.song@...
Send Email
Sep 15, 2005
6:56 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help