The demo sending email crashes

General TRichView support forum. Please post your questions here
Post Reply
russ3ell
Posts: 6
Joined: Tue Mar 01, 2016 8:18 am

The demo sending email crashes

Post by russ3ell »

I have downloaded the trial version of the product and I have now seen that it doesn't work with sending mail via outlook. So I had a look at Mime Demo and sending with Indy (we are using Indy 10). Unfortunately the demo crashes when I try to send the default message. I am using Delphi 7. Here is the code from BuildEmail:

txtpart := TIdText.Create(IdMessage1.MessageParts);
Stream := TMemoryStream.Create;
RichViewEdit1.SaveTextToStreamW('', Stream, 80, False, False);
Stream.Position := 0;
SetLength(ws, Stream.Size div 2);
if Stream.Size<>0 then
Stream.ReadBuffer(Pointer(ws)^, Stream.Size);
Stream.Free;
txtpart.Body.Text := ws;

It crashes when you set the body. However, when debugging, there is rubbish in ws.
russ3ell
Posts: 6
Joined: Tue Mar 01, 2016 8:18 am

Post by russ3ell »

I have got this working. The issue was that we are working in Delphi 7 and this was working for a later version
Post Reply