EldoS | Feel safer!

Software components for data protection, secure storage and transfer

TElSimpleMIMEMessage - add base64 encoded attachment

Also by EldoS: MsgConnect
Cross-platform protocol-independent communication framework for building peer-to-peer and client-server applications and middleware components.
Posted: 03/28/2014 12:52:08
by Darian Miller (Standard support level)
Joined: 06/27/2011
Posts: 47

I'm new to sending email with SBB and I'm wondering how to send an email with a file attachment that is already Base64 encoded. Do I need to decode it, add to the ContentStream and let the routines Encode it again or is there a way to signify that the attachment is already encoded?
Posted: 03/31/2014 03:24:42
by Alexander Ionov (EldoS Corp.)

Thank you for contacting us.

Darian Miller wrote:
Do I need to decode it, add to the ContentStream and let the routines Encode it again

That's right. Unfortunately there is no way to instruct TElSimpleMIMEMessage class that the data stream is already encoded using base64. So if you have such stream, you need to decode it first.

Best regards,
Alexander Ionov
Posted: 03/31/2014 03:40:26
by Eugene Mayevski (EldoS Corp.)

The question really is about how exactly the recipient should handle the data.

If you have the base64-encoded data that must remain encoded on the client side, when the recipient saves them to the disk or processes them otherwise, then you need to attach the data as is (not matter that they are encoded now) and this data will be encoded for the second time, but the recipient will remove first encoding and have your "original" encoded data.

If you want the recipient to see the non-encoded data, then your way is correct but there's no way to do this with TElSimpleMIMEMessage now.

Sincerely yours
Eugene Mayevski



Topic viewed 662 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!