login about faq

I'd like to be able to rename all of the related items in my email. I have 30 or so related items, all with a name around 240 characters in length. Due to certain limitations in a protocol of our product, the filename lengths can't be too long.

I know there is CkEmail::SetRelatedFilename(), but it is not clear whether or not this also renames the reference to the inline attachment from within the HTML DOM of the body. If not, how can I go about doing a proper and complete rename of the related attachments as well as references to it? Must this all be done by hand?

asked Aug 30 '13 at 11:27

rcdailey's gravatar image


It should be the case that the SetRelatedFilename method does not affect the HTML.

Images and style sheets that are embedded within the multipart/related enclosure (in the MIME) and referenced from the HTML can be referenced in one of two ways:

1) Using a "CID" URL. For example: <img src="cid:CHILKAT-CID-325820ee-8eee-4140-838d-57a75b7788ca">
In this case, the image data is found by searching for the MIME part with the matching "Content-ID" header field.

2) Using a typical URL. In this case, the IMG tag looks just like a typical IMG tag in HTML found on a web server. For example:

<img src="someImage.jpg">


<img src="http://www.chilkatsoft.com/someImage.jpg">

In this case, the image data is found by locating the MIME part where the Content-Location header matches the URL in the src attribute.

The SetRelatedFilename method sets the "filename" attribute of the Content-Type header field. This is entirely separate from both the Content-ID and Content-Location headers, and therefore the relationship between what is referenced in the HTML and the key fields in the MIME headers is not damaged.


answered Aug 30 '13 at 13:31

chilkat's gravatar image

chilkat ♦♦

Your answer
toggle preview

Follow this question

By Email:

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



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



Asked: Aug 30 '13 at 11:27

Seen: 897 times

Last updated: Aug 30 '13 at 13:31

powered by OSQA