dcsimg
Encoded Attachment
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Venky_Venky
Posted On:   Wednesday, April 25, 2001 03:54 PM

I am sending an email attachment created out of a String variable using JavaMail API. Since the String variable is more than 1000 char in length iam running into the SMTP limitation and hence need to encode the String variable using "base64". I tried using an ByteArrayOutputStream on the String variable ans passed it to MimeUtility.encode method but the attachment received had zero bytes or empty. Also i tried setting the Content-Transfer-Encoding attribute to "B" or "base64" but no success in the email MIME header. The MIME header Content-Transfer-Encoding was always coming out to be 7Bit (7-bit has 1000 char length SMTP restriction thereby    More>>

I am sending an email attachment created out of a String
variable using JavaMail API.
Since the String variable is more than 1000 char in length iam
running into the SMTP limitation and hence need to encode the
String variable using "base64".
I tried using an ByteArrayOutputStream on the String variable
ans passed it to MimeUtility.encode method but the attachment
received had zero bytes or empty.
Also i tried setting the Content-Transfer-Encoding attribute to "B"
or "base64" but no success in the email MIME header. The MIME
header Content-Transfer-Encoding was always coming out to be
7Bit (7-bit has 1000 char length SMTP restriction thereby
introducing '!' characters in the attachment) rather than
"base64".
Could some one tell me if they have had a similar scenario
before and how to work around this one.

Regards,
Venky

   <<Less

Re: Encoded Attachment

Posted By:   John_Zukowski  
Posted On:   Wednesday, April 25, 2001 07:03 PM

Use the examples already in the FAQ that show how to send attachments. Instead of getting attachment from a FileDataSource, work with a String as the DataSource.
About | Sitemap | Contact