Hello. I am trying to send an email with formatted text to use my delphi program only that instead of being sent a text is sent a .trx file as attachment. I'm using: TidMEssage - > IdMsgSend // tidSMTP // RichEdit
the shipping code is as follows:
with(TIdText.Create(IdMsgSend.MessageParts,nil))do
begin
IdMsgSend.ContentType := 'text/RichEdit';
RichEdit.Lines.SaveToFile('FileRTF.rtf');
IdMsgSend.Body.LoadFromFile('FileRTF.rtf');
end;
...
the shipping part is like this
try
SMTP.ConnectTimeout:=15000;
SMTP.ReadTimeout:=15000;
SMTP.Connect;
SMTP.Send(IdMsgSend);
Self.Tag:=1;
except
on E:Exception do
ShowMessage(E.Message) ;
end;
in the attached trx file has this formatting
I've tried things like instead of loading a file to do direct assignments and streaming. The end result is the same. Instead of formatted text, a .trx file with the formatting is attached. Something that is escaping me? Thank you.