Board index » delphi » Forwarding Mail

Forwarding Mail

I have written code that pulls down mail through Indy Pop3 control. I am
retrieving the message into a TiDMessage component, I then want to forward
the message to another person using the Indy SMTP control.

I know it sounds simple enough, I have broken the message up into individual
components and created a new message, I have problems creating a new message
which is MIME based.

Is there a much simpler way to do it - am I missing something, can anyone
suggest a better way or direct me to a working example.

Thanks in advance.

Matthew

 

Re:Forwarding Mail


I had a similar problem when trying to forward email. I needed to save it on
disk, then forward it later.
This mail may have been dated, but the easiest way I got this to work is to
do a pop.RetrieveRaw, then write the message to disk via the
StringList.SaveToFile, then use the socket.WriteFile to send it to an SMTP
server. Unfortunately, SaveToFile / LoadFromFile mangle the message so MIME
does not work properly with it. I can send you the code if you like.

Tom Schaefer

Quote
"Matthew McGowan" <matton...@hotmail.com> wrote in message

news:3c62b273_1@dnews...
Quote
> I have written code that pulls down mail through Indy Pop3 control. I am
> retrieving the message into a TiDMessage component, I then want to forward
> the message to another person using the Indy SMTP control.

> I know it sounds simple enough, I have broken the message up into
individual
> components and created a new message, I have problems creating a new
message
> which is MIME based.

> Is there a much simpler way to do it - am I missing something, can anyone
> suggest a better way or direct me to a working example.

> Thanks in advance.

> Matthew

Other Threads