Hello!
I’m developing a Confluence Server java plugin, which will allow users to send stubs of Pages and Blogposts via e-mail messages. I’m missing one final part - how to embed images (hosted in Confluence as attachments) in e-mail messages?
I’m generating html message content this way:
AbstractPage page = pageManager.getAbstractPage(pageId);
DeviceTypeAwareRenderer renderer = (DeviceTypeAwareRenderer)ContainerManager.getComponent("viewRenderer");
ConversionContext conversionContext = new DefaultConversionContext(page.toPageContext());
String pageHtmlContent = renderer.render(page.getEntity(), conversionContext);
In this html code I have img src pointing to attachments, to which access is restricted and no email clients displays those images properly:
Do you have any ideas how to solve this problem? Any help will be much appreciated!