Re: [twsocket] Decoding MIME messages

2009-11-18 Thread Kochendoerfer, Michael
Francois,

I'm trying to write a very basic automation, which should try to detect some 
patterns within mails, and if a mail content matches, it should save that mail 
for further processing and delete it from the pop3 server. Each unprocessed 
('unknown' content) should stay on the server, until there's a handler for that 
unknown pattern.

In other words, it should be a system where rules/patterns are added as soon as 
they're needed.

What I've done so far is using a TPop3Cli component to read mails (in the first 
step without deleting from server) and a TMimeDecodeW component to get the 
contents. What's to do next is to separate readable (textual) parts of the mail 
and ignore all inlines or attachments.

I don't need full code, but a step by step guideline on how to accomplish it. 
Currently I'm trying to use TMimeDecodeEx, which seems toi do what I need.

Michael

-Original Message-
From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org] On 
Behalf Of Francois PIETTE
Sent: Wednesday, November 18, 2009 6:48 AM
To: ICS support mailing
Subject: Re: [twsocket] Decoding MIME messages

 What I basically need is to extract a text part from each mail, regardless
 how many contents it may have.

The text part is not well defined. You may have an HTML message which is
not trivial to convert to a text file. Rendered on screen by a HTML rendere,
it may looks like plain text but actually it isn't. You may also have an RTF
formatted message. Or a plain text part and a HTML part with eauivalent
content. You have to handle all the situation by detecting what format it
is. You are helped by the various headers.

Are you writing an email client, that is a program whose goal is to display
messages on screen ? Then you need ICS-POP3 component to retieve the
messages, ICS MIME component to extract the parts and as many renderer
component as you want to support messages types.

Are you writing some sort of automation which uses email as transport and
use the data within email for data processing and not to display it on
screen as an email ? That's a different thing.


--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Legal Notice: 

HEM Vertriebs GmbH
Haller Strasse 30
D-74523 Schwaebisch Hall
Fon: +49-791-4079-0
Fax: +49-791-4079-80 

http://www.hem.de   email: i...@hem.de

Rechtsform : HEM Vertriebs GmbH
Handelsregister : Stuttgart HRB 570346
Steuernummer: 84060/00397 UST-ID DE256870483
Sitz der Gesellschaft : Schwäbisch Hall
Geschaeftsfuehrer: Gunter Schaaf, Rene Schaaf

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Re: [twsocket] Decoding MIME messages

2009-11-18 Thread Arno Garrels
Michael Kochendoerfer wrote:
 Arno,
 
 generally, the program should be able to extract the most important
 information of an automated reply to a mail, i.e. from a mailserver
 when the destination is unknown, mailbox is full, relaying isn't
 allowed and the like. Some mailservers seem to return the original
 mail completely, including all original attachments. But those aren't
 of any interest ;)

Ok, then just exclude text attachments from being parsed (disposition
attachment at least). There are text/plain, text/html and even text/rtf
parts though I guess most servers reply text/plain with 7-bit ASCII
encoding.  
 
 
 The program is meant to act as a feed for a database containing some
 mail addresses, and does some action there (delete mail addresses
 which don't exist, put a note on mail addresses where the mailbox is
 full, and the like). But the most difficult job would be to determine
 which failure is described where and how, in each reply

That's true, since there are probably as many different replies
possible as mail servers exist. 
 
--
Arno Garrels
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] Future plans of ICS

2009-11-18 Thread Anton Sviridov
I have a couple of questions about future of ICS.
1) FPC port. Will it continue someday? Or maybe just Linux support (according 
to Emb's roadmap to bring something like Kylix to life someday)?

2) Parse listings in FTP client. I do not ask for parsing implementation (as I 
understood, you don't feel doing it), but a kind of general workaround, like 
OnParse event, internal getting listing to TStringList, and so on. Think it 
would be helpful and not dealing with not standartized things which you don't 
like.

--
Regards, Anton
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Future plans of ICS

2009-11-18 Thread Angus Robertson - Magenta Systems Ltd
 2) Parse listings in FTP client. I do not ask for parsing 
 implementation (as I understood, you don't feel doing it)

Full FTP parsing is implemented in TMagFtp, which is a high level version
of TFtpClient, you can use the entire unit or borrow
TMagFtp.UnpackFtpFDir (which has a lot of dependencies).  

http://www.magsys.co.uk/delphi/magxfer.asp

Angus

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Future plans of ICS

2009-11-18 Thread Paul


IPv6 would be nice too :)

Paul
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Future plans of ICS

2009-11-18 Thread Fastream Technologies
What about ISAPI Filter support for ICS web server?

Regards,

SZ

On Wed, Nov 18, 2009 at 2:58 PM, Paul paul.blommae...@telenet.be wrote:


 IPv6 would be nice too :)

 Paul

 --
 To unsubscribe or change your settings for TWSocket mailing list
 please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
 Visit our website at http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Future plans of ICS

2009-11-18 Thread Anton Sviridov
Angus,
I know and have already looked into the code, and even tryed to understand it :)
But as you've mentioned it's not trivial to grab parsing code out of the 
component because of lots custom routines used.
And I'm talking of slightly another thing: a standard and native ICS interface 
for parsing. For instance:

ftp.Feat() // get feats, determine whether server supports MLST, or MDTM, or 
anything related
...
ftp.GetListing(RemoteDir) - ftp.List(RemoteDir) - get listing into 
ListingStream - convert it to ListingStringList - invoke OnFtpListingParse

not very hard as I see it, but make it easy for others to implement parsing 
function.

But of course, merging Magenta's parsing into ICS would be much more helpful 
and useful.

Full FTP parsing is implemented in TMagFtp, which is a high level version
of TFtpClient, you can use the entire unit or borrow
TMagFtp.UnpackFtpFDir (which has a lot of dependencies).  

-- 
Anton
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] Download file from FTP with ProgressBar in Delphi

2009-11-18 Thread Anton Nikulin
Hi! I use FtpClient to download file from FTP-server. How can I show
download progress in ProgressBar?
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Future plans of ICS

2009-11-18 Thread Francois PIETTE

I have a couple of questions about future of ICS.
1) FPC port. Will it continue someday?


Actually, I never made anything for FPC support, except accepting changes 
from some developpers to help using ICS in FPC.


Or maybe just Linux support (according to Emb's roadmap to bring something 
like Kylix to life someday)?


I had invested a lot in the linux version with exactly not return on 
investment. As you said, it looks like Embarcadero will some time in the 
future have a Linux version. This time I will invest it only if I have some 
expected result (read: if I get paid for updating the latest ICS to whatever 
will the Delphi for Linux be).



2) Parse listings in FTP client.


I think FTP component is about transport, including transporting a file 
list. Parsing a file list should - imo - implemented in another component. 
This is similar to what I've done with POP3 and MIME decode components.


Regards,
--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Future plans of ICS

2009-11-18 Thread Anton Sviridov
Francois, thanks for answer.

1) Ok, I've got your point.

2) I see your point in this too, but you could add some helping thigs like 
those I suggested, aren't you?

--
Anton
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


[twsocket] libeay32.dll issue

2009-11-18 Thread A Drent
I've tried to convert a D6 ftps app to D2007. This goes well. However when 
running I get a compatibility error about libeay32.dll. That can be correct 
so I downloaded from the link on the overbyte the openssl version. However 
there are only lib files and no dll's. Am I missing some things or do things 
work differently  nowadays?


regards, Albert Drent
university of Groningen

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Future plans of ICS

2009-11-18 Thread Francois PIETTE
2) I see your point in this too, but you could add some helping thigs like 
those I suggested, aren't you?


I don't think anything special is required. Once you get the file list, as 
any other file, you just submit it to your decoding class. Probably from the 
OnRequestDone event.


--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] libeay32.dll issue

2009-11-18 Thread Francois PIETTE
I've tried to convert a D6 ftps app to D2007. This goes well. However when 
running I get a compatibility error about libeay32.dll. That can be 
correct so I downloaded from the link on the overbyte the openssl version. 
However there are only lib files and no dll's. Am I missing some things or 
do things work differently  nowadays?


http://wiki.overbyte.be/wiki/index.php/FAQ
See topic about download OpenSSL Binaries


--
francois.pie...@overbyte.be
The author of the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Download file from FTP with ProgressBar in Delphi

2009-11-18 Thread Jeff Cook
Hi Anton

I think you just need to use the OnProgress event like this ...

procedure TFTPDownloadForm.FTPProgress(Sender: TObject; Count: Integer;
  var Abort: Boolean);
begin
  Abort := bCancel; // bCancel is a boolean set by clicking cancel
button
  progDB.Position := Count;
end;

HTH

Jeff

--
Jeff Cook
Aspect Systems Ltd
www.aspect.co.nz
+
The Cooks Oasis
www.cookislandsoasis.com
Phone: +682 28 213
Skype: jeffraro
 


-Original Message-
From: twsocket-boun...@elists.org [mailto:twsocket-boun...@elists.org]
On Behalf Of Anton Nikulin
Sent: Wednesday, 18 November 2009 4:27 a.m.
To: twsocket@elists.org
Subject: [twsocket] Download file from FTP with ProgressBar in Delphi


Hi! I use FtpClient to download file from FTP-server. How can I show
download progress in ProgressBar?
--
To unsubscribe or change your settings for TWSocket mailing list please
goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Download file from FTP with ProgressBar in Delphi

2009-11-18 Thread Anton Nikulin
2009/11/18 Jeff Cook je...@aspect.co.nz

 Hi Anton

 I think you just need to use the OnProgress event like this ...

 procedure TFTPDownloadForm.FTPProgress(Sender: TObject; Count: Integer;
  var Abort: Boolean);
 begin
  Abort := bCancel; // bCancel is a boolean set by clicking cancel
 button
  progDB.Position := Count;
 end;

 HTH

 Jeff

 Thank you Jeff!

procedure TFTPClientForm.FtpClient1Progress64(Sender: TObject; Count: Int64;
  var Abort: Boolean);
begin
  ProgressBar1.Position:=Count;
end;

procedure TFTPClientForm.FtpClient1RequestDone(Sender: TObject;
  RqType: TFtpRequest; ErrCode: Word);
begin
  ProgressBar1.Position:=0;
end;

ICS is the best!
--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be


Re: [twsocket] Download file from FTP with ProgressBar in Delphi

2009-11-18 Thread Arno Garrels
Anton Nikulin wrote:
 
 procedure TFTPClientForm.FtpClient1Progress64(Sender: TObject; Count:
  Int64; var Abort: Boolean);
 begin
  ProgressBar1.Position:=Count;
 end;

Note that updating the progressbar too frequently may slow down
overall application performance and will eat a lot of CPU power.
This won't be visible on a slow DSL line but on fast connections.
The FTPClient demo shows how to not update the progress label
each time OnProgress64 fires.

--
Arno Garrels 

--
To unsubscribe or change your settings for TWSocket mailing list
please goto http://lists.elists.org/cgi-bin/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be