Re: Indy 10 IdSMTServer- How to extract The Header and The Message

Giganews Newsgroups
Subject: Re: Indy 10 IdSMTServer- How to extract The Header and The Message
Posted by:  Remy Lebeau (TeamB) (no.spam@no.spam.com)
Date: Fri, 21 Jan 2005

"Anti-Tux" <antit…@antitux.de> wrote in message
news:3D0AD783AFBCE240antit…@antitux.de...

> on MsgReceive I will get only the RAW Mail, which I storge
> in aMemo
>
>  memo1.lines.loadfromstream(amsg);

You cannot safely do that.  The event handler can be triggered in the
context of a worker thread, not the main thread.  As such, you need to use
the TIdSync class to synchronize all access to the GUI in a thread-safe
manner.

> How can I seperate the message and the header?

The headers are separated from the body by a blank line.

> In Indy 9 there was now problem.

That is because Indy 9 offered several different types of events that
attempted to process the data for you.  In Indy 10, you have to process it
yourself.

Gambit

Replies

In response to

Indy 10 IdSMTServer- How to extract The Header and The Message posted by Anti-Tux on Fri, 21 Jan 2005