Constructing MIME message from BLOB
Right now we have the capability of saving the Mail message as BLOB in DB if sending gets failed for use later, The BLOB we are creating from the mail message is encoded using Base64 encoder since it has the attachments in it. By the RFC specification when converting to a BLOB, a boundary is created for each part in the mail message. Due to the compatibility with the RFC 934, the boundary is preceded with the hyphen(-).
Since hyphen is not specified in the Base64 table its throwing the Exception as "error in the encoded stream, needed at least 2 valid base64 characters" while decoding with Base64 decoder. We tried with splitting each part based on the boundary, but it has the header information along with the part and its throwing the exception "Error in inputstream".
Re: Constructing MIME message from BLOB
It looks like you know the answer to your question...don't use RFC 934