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

What is the correct way to send emails from within a plugin?

Brett Ryan
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.
July 10, 2012

I would like to know the correct way to create email entries in a plugin s to send the emails to recipient addresses.

I have a job and trigger that need to send a status report at the end of each execution.

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

5 votes
Answer accepted
Dieter
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.
July 10, 2012
Dieter
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.
July 10, 2012
That way emails are queued in Jiras mail queue which also does error handling
Dieter
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.
July 10, 2012
Ooops, soory. This answer is for Jira plugins only
Dieter
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.
July 10, 2012
Brett Ryan
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.
July 10, 2012

Excellent, update the answer for me and I'll accept, but keep both links :)

Out of interest, do you know if there is a document on developer.atlassian.com which describes these processes? I couldn't find such a document myself and may create one at a later date.

Dieter
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.
July 10, 2012
Can't find anything else on d.a.c, just google reveals some more useful links from other sites, e.g. http://www.pixsoftware.nl/en/plugins/122-k15t/2245-sending-email-from-confluence-plugins written by my friends from k15t
Mizan
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.
July 10, 2012
JamieA
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.
July 10, 2012

Yes, the code above handles that.

Mizan
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.
July 10, 2012

Thanks Jamie .

Dieter
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.
July 10, 2012

thank's all, guys. Never earned that much karma with a single answer :-)

MattS
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.
July 26, 2012

The thing I've found is that if someone is not a JIRA user, their email address may be outside your organization. And mail servers don't always relay email to non-local domain addresses.

Brett Ryan
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.
July 26, 2012
Hi Matt. Plugins shouldn't be concerned with limitations imposed on a mail server. Such a configuration sounds very limiting. Even if that user was a JIRA user the email server in question would still have issues if the mail address was not of the company domain.
1 vote
Diogo Miguel July 10, 2012

Hi @Mizan,

The link don't working, can you put another link or a PDF with the information in the link?

Thanks.

Mizan
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.
July 10, 2012

Hi Diogo ,

The link leads to a source code and is working .

I want to know whether it is possible to send email the issue to someone who is not a jira user based on some event .

Thank you

Diogo Miguel July 10, 2012

Yes it is working, i don't know what happens to don't work at the first time.

Thanks.

TAGS
AUG Leaders

Atlassian Community Events