Quantcast
Channel: Atozed Forums - All Forums
Viewing all articles
Browse latest Browse all 275

Bug with TIdMessageBuilderHtml and TIdAttachmentFile

$
0
0
I run into a real problem here.

I have just found out that when I create an HTML email using TIdMessageBuilderHtml and also want to attach a file using TIdAttachmentFile, the file attachment fails.

It does not make a difference in which order I do it.
Is there anything I can do to fix it?

Code:
with TIdMessageBuilderHtml.Create do
    try
      PlainText.Text := PlainBody;
      Html.Text := HTMLBody;
      FillMessage(IdMessage);
    finally
      Free;
    end;

TIdAttachmentFile.Create(IdMessage.MessageParts, AAttachment);
idMessage.SaveToFile('msg.eml');

When opening the saved file, no attachments. Obviousely also when I actually send it with SMTP.

Viewing all articles
Browse latest Browse all 275

Trending Articles