If TIdMessage.NoDecode
is set to False, then no, it is not possible. When NoDecode
is False, TIdMessageClient
decodes the email as it is being read off the socket and places decoded binary data into attachment objects. The only way to get the original base64 data is to set TIdMessage.NoDecode
to True and parse the raw email data manually (it is stored as-is in the TIdMessage.Body
) as you would effectively be disabling TIdMessageClient's
entire decoding system.
On the other hand, if you just want to avoid the temp file, you can use the TIdMessage.OnCreateAttachment
event to have Indy create TIdAttachmentMemory
objects instead of the default TIdAttachmentFile
objects. The base64 will still be auto-decoded and stored as binary in the attachment, but at least the attachment would be solely in memory so your re-encode would be faster.