Login  
Search All Forums
Dart Home | PowerTCP Mail for ActiveX | Custom Development Reply | PowerTCP Mail for ActiveX Topics | Forums   
AuthorForum: PowerTCP Mail for ActiveX
Topic: leaks and hexa chars 0d 0d 0a
Adrian-Bogdan Andreias
sheic@softhome.net

From: Cluj-Napoca, Romania
Posts: 9
Member Since: 09/16/02
posted September 16, 2002 5:25 AM

Hi,

1. Can you say that there are no leaks in POP component?

2. After downloading a mail from POP server how can I save the mail with the windows lf cr chars?
It is saved with hexa chars 0d 0d 0a, whichever method I use for saving.

Thanks
Jon Belanger



From: Rome, NY USA
Posts: 310
Member Since: 06/10/02
posted September 16, 2002 9:46 AM

0d is a CR and 0a is an LF, so CRLF is appended to each line on a store. Are you having trouble with a particular message or all messages. Thanks.
Adrian-Bogdan Andreias
sheic@softhome.net

From: Cluj-Napoca, Romania
Posts: 9
Member Since: 09/16/02
posted September 16, 2002 10:29 AM

The problem is with all emails.

Yes 0d0a would be the CRLF, but all lines in email end with 0d0d0a; that's an extra char.

Jon Belanger



From: Rome, NY USA
Posts: 310
Member Since: 06/10/02
posted September 16, 2002 11:16 AM

When I do this with the updated version of the Mail tool I get 0d 0a at the end of the lines. Can you send me an ".eml" of an email you are having trouble with? Zip it and send it to support@dart.com with a description of the problem. Thanks.

Public WithEvents pop1 As DartMail.pop

Private Sub Command1_Click()
  
  Set pop1 = New DartMail.pop
  pop1.Login server, user, pwd
  
  Debug.Print "logged in..."
  
  pop1.Get msgContent, "1"
  
  Debug.Print pop1.Messages.Item(1).Text
  
  pop1.Messages.Item(1).Store "c:\test.eml", msgEncoded

  pop1.Logout

End Sub

Are you doing something different? Thanks.
Adrian-Bogdan Andreias
sheic@softhome.net

From: Cluj-Napoca, Romania
Posts: 9
Member Since: 09/16/02
posted September 20, 2002 9:16 AM

I am not doing anything different.

I do not think that the email will help you much.

I think that it is important to tell you that the POP server is
Red Hat Linux release 7.1 (Seawolf)
Kernel 2.4.2-2 on an i586.

During debugging when I look at the email, lines are seppareted with 0d0a. That means that during saving an extra 0d char is inserted; that means that in the saved file lines are seppareted with 0d0d0a.

I get this when:
- saving with your store method
- getting the body of the message and saving it my self with the C++ standard functions fopen/fwrite/fclose.

I've implemented my own POP client without using POP dart and saved the message with C++ functions fopen/fwrite/fclose. Well, it's the same effect :))) : lines are seppareted with 0d0d0a.

Then I've used Win API functions CreateFile/WriteFile/CloseHandle. Now the email is saved, ok.

So guys, you are using fopen/fwrite/fclose in Pop::Store method; if you'll use fopen/fwrite/fclose you'll fix this bug.

Note: all tests were done using the above specified POP server; the bug comes from the incompatibility between Windows OS and Linux/UNIX OS-es regarding the new-line (line feed) character(s).
Adrian-Bogdan Andreias
sheic@softhome.net

From: Cluj-Napoca, Romania
Posts: 9
Member Since: 09/16/02
posted September 20, 2002 9:25 AM

Sorry, I meant if you'll use CreateFile/WriteFile/CloseHandle you'll fix this bug.

FYI: 0a is the line sepprator char in UNIX compatible OS-es and in Windows it's 0d0a.

Jon Belanger



From: Rome, NY USA
Posts: 310
Member Since: 06/10/02
posted September 20, 2002 9:48 AM

We are running in.pop3d here to test against. You are probably using that same pop server. I can send myself an email to the smtp server on that machine, and then pop it with our VC++ POP client, and save it to disk. All of the characters are correct.

  We haven't had anyone mention anything like this, so I have to assume our methods are sound.

  Since you are running a Linux server, you can probably get the email out of a spool directory on the server and send it to us here at support@dart.com.
Reply | PowerTCP Mail for ActiveX Topics | Forums   
This site is powered by PowerTCP WebServer Tool PowerTCP WebServer for ActiveX