Try OpenEdge Now
skip to main content
BP Server Developer's Guide
E-mail templates for task completion : HTML e-mail templates : HTML images : Content-ID URLs for images
 
Content-ID URLs for images
Sometimes, the e-mail server cannot resolve the embedded images uniquely for the following reasons:
*Same image file name with different content may be referred to at multiple places in a single HTML page.
*Same image file name with different content may be referred to from multiple e-mails.
You can overcome this issue by using the content-ID URLs for the images. These content-ID URLs resolve the images uniquely for each image referred to in each e-mail and within each e-maill content. If the text of an HTML e-mail contains a link to other part of the same e-mail, then it should also use the content-ID URLs to refer to another part of the same e-mail. The content-ID URLs are case-sensitive. You can use the protocol "cid:" to define a content-ID URL. Content-ID URL of a specific length can be generated by using the CIDGenerator class. To ensure uniqueness across e-mails, BP Server uses the following content-ID URL format:
<10-digit-random-number>+outgoing-mail-server+".img"
When a content-ID ends with .com, the e-mail server may assume that the attachment is a binary executable and reject the e-mail. To avoid this issue, .img suffix is added. It also conveys that this content-ID is generated for an <img> tag.