Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Sending mails with images using MailAttachmentsManager

Pablo Gomez Justicia May 5, 2017

Hi, I'm developing a postfunction that creates and sends an e-mail and I want to include the avatar of the user. I found the interface MailAttachmentsManager, but I haven't found any examples of how to create the object. I've tried this:

 

JiraHome jiraHome = new DefaultJiraHome();
AvatarTagger avatarTagger = new AvatarTaggerImpl(jiraHome);
AvatarTranscoder avatarTranscoder = new AvatarTranscoder(ComponentAccessor.getAvatarManager(), avatarTagger);
MailAttachmentsManager mailAttachmentsManager = new MailAttachmentsManagerImpl(ComponentAccessor.
getAvatarService(), avatarTranscoder, ComponentAccessor.getUserManager(), ComponentAccessor.getAvatarManager(), ComponentAccessor.getApplicationProperties());

But, I get the error: java.lang.InstantiationError: com.atlassian.jira.avatar.AvatarTranscoder

can anybody help me?

 

2 answers

0 votes
Pablo Gomez Justicia May 8, 2017

Thank Sam. I tried to ask in the community, but they disabled my account and my question disappeared.

0 votes
Sam Hall
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 5, 2017

Hi Pablo - if you don't get an answer here, consider also asking this over at: https://community.developer.atlassian.com (if you haven't already).

You can read more about the Developer Community in this article: https://community.atlassian.com/t5/Feedback-Forum-articles/The-Atlassian-Developer-Community/ba-p/459061

Suggest an answer

Log in or Sign up to answer