Class EmailHeaderBuilders.MessageIdBuilder
java.lang.Object
com.atlassian.jira.mail.threading.EmailHeaderBuilders.MessageIdBuilder
- Enclosing class:
- EmailHeaderBuilders
Responsible for building the Message-Id string values to be included in JIRA's issue email notifications.
This has to be globally unique and can only contain certain ASCII characters. Used to distinguish
between different emails. sequence and System.currentTimeMillis() are used to make the Message-ID
unique.
JIRA.${issue-id}.${created-date-millis}.${sequence-id}.${current-time-millis}@${host}
These message-ids are parsed by
MailThreadManager.getAssociatedIssueObject(javax.mail.Message)
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuild()sequenceandhostnameare required for this method to work, since they are needed for the returned String to be valid as a Message-ID for JIRA's purposes.setDropMillis(boolean dropMillis) setHostName(String hostName) setSequence(int sequence)
-
Constructor Details
-
MessageIdBuilder
-
-
Method Details
-
setSequence
-
setHostName
-
setDropMillis
-
build
sequenceandhostnameare required for this method to work, since they are needed for the returned String to be valid as a Message-ID for JIRA's purposes. It is important that the resulting String is NOT wrapped in angle brackets, even though email spec requires this, since this is the responsibility of the caller (in contrast toInReplyToHeaderBuilder).- Returns:
- a String representation of a Message-ID to be used as an email header value.
-