login about faq

Here's the scenario (ChilkatDotNet2.dll, 9.3.1.0):

Received an email with a PDF attached, the standard mail client/web client extract the file correctly, while the Chilkat.Email object loaded with the same message contains an invalid file.

If I lookup at the original source, with .FetchMime(uidl), this is what it shows at the start of the attachment

[...]
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="Some File.pdf"
Content-Type: text/html; name="Some File.pdf"

JVBERi0xLjQKJcjH0MRGCjQgMCBvYmoKPDwKL1R5cGUgL091dGxpbmVzCi9Db3VudCAwCj4+
[...]

After i use the MIME string to generate the full Email object, this is how it's altered:

[...]
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="Some File.pdf"
Content-Type: text/html; charset="utf-8"; name="Some File.pdf"

5YCl5JmE44St45Cu4pSK7J+I7JOQ4KmG4oC04oCw5omv4Kmq47C84ryK56WU5pWw4ryg55WP5rG0
[...]

Now, "Content-Type: text/html" is an error from the sender client, which i have no control of, but the problem is that the chilkat object re-encodes the attachment

If i manually alter the string, injecting "application/pdf" in the right spot, and then pass that to .SetFromMimeText(TheMimeText), the message is okay, but of course this is not a feasible workaround

is there any other way to avoid this?

asked Dec 17 '13 at 04:14

Luca%20D's gravatar image

Luca D
1111

Be the first one to answer this question!
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or __italic__
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×18
×12
×3

Asked: Dec 17 '13 at 04:14

Seen: 1,295 times

Last updated: Dec 17 '13 at 04:14

powered by OSQA