public class MailListener extends AbstractIssueEventListener implements IssueEventListener, UserEventListener
At the moment when this listener is activated it will email the reporter, assignee and any watchers.
The content of the emails is governed by Velocity templates (in /templates) and the emails are sent out by the MailSender.
Parameters: email.from - who the emails should be sent from email.server - the SMTP server to send email through email.session - the JNDI location of a MailSession to use when sending email subject.prefix - (optional) any prefix for the subject, like "[FooBar]" -> Subject: [FooBar] BazBat
DebugMailListener| Constructor and Description |
|---|
MailListener(UserManager userManager,
IssueEventBundleMailHandler issueEventBundleMailHandler,
com.atlassian.mail.queue.MailQueue mailQueue,
IssueEventBundleFactory issueEventBundleFactory) |
| Modifier and Type | Method and Description |
|---|---|
String[] |
getAcceptedParams()
Returns the parameters used by this listener.
|
String |
getDescription()
Returns a textual description of the listener.
|
protected void |
handleDefaultIssueEvent(IssueEvent event)
If you need to treat all the issue events equally, override this method and add logic to handle events.
|
void |
handleIssueEventBundle(IssueEventBundle bundle) |
void |
init(Map params)
Initialises the listener with the given parameters.
|
boolean |
isInternal()
Indicates whether this listener is internal, meaning it cannot be
removed by an administrator.
|
boolean |
isUnique()
Indicates whether JIRA should only create one instance of this listener.
|
protected void |
sendUserMail(UserEvent event,
String subject,
String subjectKey,
String template) |
void |
userCannotChangePassword(UserEvent event)
Fired when a user tries to change their password, and the password cannot be updated
|
void |
userCreated(UserEvent event)
Fired when a user is created automatically
|
void |
userForgotPassword(UserEvent event)
Fired when a user indicates they have forgotten their password
|
void |
userForgotUsername(UserEvent event)
Fired when a user indicates they have forgotten their username
|
void |
userSignup(UserEvent event)
Fired when a user signs up manually
|
customEvent, getI18NBean, issueAssigned, issueClosed, issueCommentDeleted, issueCommented, issueCommentEdited, issueCreated, issueDeleted, issueGenericEvent, issueMoved, issueReopened, issueResolved, issueStarted, issueStopped, issueUpdated, issueWorklogDeleted, issueWorkLogged, issueWorklogUpdated, workflowEventclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcustomEvent, issueAssigned, issueClosed, issueCommented, issueCreated, issueDeleted, issueGenericEvent, issueMoved, issueReopened, issueResolved, issueStarted, issueStopped, issueUpdated, issueWorkLogged, workflowEventpublic MailListener(UserManager userManager, IssueEventBundleMailHandler issueEventBundleMailHandler, com.atlassian.mail.queue.MailQueue mailQueue, IssueEventBundleFactory issueEventBundleFactory)
public void init(Map params)
JiraListenerinit in interface JiraListenerinit in class AbstractIssueEventListenerparams - the initialisation parameters given in the Listener Propertiespublic String[] getAcceptedParams()
JiraListenergetAcceptedParams in interface JiraListenergetAcceptedParams in class AbstractIssueEventListenerpublic boolean isInternal()
JiraListenerisInternal in interface JiraListenerisInternal in class AbstractIssueEventListenertrue if this is an Atlassian listener, otherwise public boolean isUnique()
JiraListenerisUnique in interface JiraListenerisUnique in class AbstractIssueEventListenerpublic String getDescription()
JiraListenerA good description will describe what this listener does and explain the parameters required for configuring it.
getDescription in interface JiraListenergetDescription in class AbstractIssueEventListenerpublic void userSignup(UserEvent event)
UserEventListeneruserSignup in interface UserEventListenerevent - the event in playpublic void userCreated(UserEvent event)
UserEventListeneruserCreated in interface UserEventListenerevent - the event in playpublic void userForgotPassword(UserEvent event)
UserEventListeneruserForgotPassword in interface UserEventListenerevent - the event in playpublic void userForgotUsername(UserEvent event)
UserEventListeneruserForgotUsername in interface UserEventListenerevent - the event in playpublic void userCannotChangePassword(UserEvent event)
UserEventListeneruserCannotChangePassword in interface UserEventListenerevent - the event in playprotected void sendUserMail(UserEvent event, String subject, String subjectKey, String template)
@EventListener public void handleIssueEventBundle(IssueEventBundle bundle)
protected void handleDefaultIssueEvent(IssueEvent event)
AbstractIssueEventListenerhandleDefaultIssueEvent in class AbstractIssueEventListenerevent - The received eventCopyright © 2002-2015 Atlassian. All Rights Reserved.