Re: Msg.Recipients.Items[0].Address Exception?

Giganews Newsgroups
Subject: Re: Msg.Recipients.Items[0].Address Exception?
Posted by:  Remy Lebeau (TeamB) (no.spam@no.spam.com)
Date: Wed, 6 Oct 2004

"Sabine Dinis Blochberger" <no.spam@here.invalid> wrote in message
news:3879909946AFE240no.spam@here.invalid...

> I'm trying to know the envelope-to field of a *received* email.
> If I use
>  envTo := Msg.Recipients.Items[0].Address;
> I get an "index exceeds maximum (0)" exception.

TIdMessage does not parse the "envelope-to" header at all.  You will have to
retreive and parse it manually:

    envTo := Msg.Headers.Values['Envelope-To'];
    // parse envTo as needed...

Gambit

Replies

None

In response to

Msg.Recipients.Items[0].Address Exception? posted by Sabine Dinis Blochberger on Wed, 06 Oct 2004