Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

I'm upgrading Bamboo from v5.4.2 to v5.14.3.1 and wanted to know how can I send an email from a custom plugin

I am upgrading Bamboo and have a custom plugin that I'd like to send email but I'm having a hard time getting it to work. Is there any developer documents or examples that I can take a look at to get this working?

3 answers

1 accepted

1 vote
Answer accepted

If he can't do it the way he was doing it perhaps this might work? 

 

Email email = new Email(recipient).setSubject(subject).setBody(message); 

eventPublisher.publish(new EmailEvent(this, email));

0 votes

Is there a specific problem you have with that plugin?

I can't instantiate BambooMailer. Prior to v5.10 it was a no argument constructor.

 

bambooMailer = new BambooMailer(new EmailService(new XMLMailServerManager())); gives a signature mismatch

bambooMailer = new BambooMailer(new EmailService(new BambooMailServerManager())); gives a signature mismatch

BambooMailServerManager bambooMailServerManager = new BambooMailServerManager();
SMTPMailServer mailServer = bambooMailServerManager.getDefaultSMTPMailServer(); gives a NPE
0 votes

BambooMailer is a Spring bean that was never available to plugins and you're not supposed to initialize it manually. You'll have to send the email using standard Java APIs.

I don't see why it shouldn't be made available to plugins - feel free to open an improvement request at jira.atlassian.com

 

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bamboo

Bamboo 7.1 is here and is packed with value!

I'm happy to announce that Bamboo 7.1 has been released and it’s overflowing with awesome new features. Top-voted issues First and foremost, a bunch of JAC top voted issues has been delivered - y...

595 views 1 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you