Board index » delphi » Sample for forwarding a message?

Sample for forwarding a message?

Hi,

I want to forward messages (html-formatted and plain-text) using Indy 9. I I
use NoEncode = true then I can forward the message as it is. But I want to
change the subject like "Fw: " + subject and a part of the body.

Has anyone a hint or sample code that realizes that?

Thanks. Uli

 

Re:Sample for forwarding a message?


Quote
"Uli Becker" <fo...@nospambeckersoft.de> wrote in message

news:3ee1cee7@newsgroups.borland.com...

Quote
> Hi,

> I want to forward messages (html-formatted and plain-text) using Indy 9. I
I
> use NoEncode = true then I can forward the message as it is. But I want to
> change the subject like "Fw: " + subject and a part of the body.

Off the top of my head, try NoEncode := True, NoDecode := False.
This should populate the subject.
Chance the Subject property and send as normal.

Andy

Re:Sample for forwarding a message?


Thanks, but that does not seem to work, here my code:

with ForwardMessage do
  begin
    noEncode := true;
    nodecode := false;
    str := TDBISAMBlobStream.create(dm.MessagestableRawMessage,bmread);
    try
     loadFromStream(str);
    finally
     str.free;
    end;

    Recipients.clear;
    Recipients.EMailAddresses := 't...@test.de'
    Subject := 'Fw: ' + ForwardMessage.Subject;

    dm.Accountstable.locate('Default',true,[]);
    Username := dm.AccountstableUsername.value;
    Host := dm.AccountstableSMTPServer.value;
    ReplyTo.EMailAddresses := dm.AccountstableReplyMail.value;
  end;

  ForwardSMTP.connect;
  ForwardSMTP.Send(ForwardMessage);
  ForwardSMTP.Disconnect;

Subject is the same as before after sending.

Regards Uli

"Andrew Neillans" <a...@neillans.co.uk> schrieb im Newsbeitrag
news:3ee309b6@newsgroups.borland.com...

Quote
> "Uli Becker" <fo...@nospambeckersoft.de> wrote in message
> news:3ee1cee7@newsgroups.borland.com...
> > Hi,

> > I want to forward messages (html-formatted and plain-text) using Indy 9.
I
> I
> > use NoEncode = true then I can forward the message as it is. But I want
to
> > change the subject like "Fw: " + subject and a part of the body.

> Off the top of my head, try NoEncode := True, NoDecode := False.
> This should populate the subject.
> Chance the Subject property and send as normal.

> Andy

Other Threads