public static class EmailHeaderBuilders.MessageIdBuilder extends Object
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 and Description |
---|
MessageIdBuilder(Issue issue) |
Modifier and Type | Method and Description |
---|---|
String |
build()
sequence and hostname are 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. |
EmailHeaderBuilders.MessageIdBuilder |
setDropMillis(boolean dropMillis) |
EmailHeaderBuilders.MessageIdBuilder |
setHostName(String hostName) |
EmailHeaderBuilders.MessageIdBuilder |
setSequence(int sequence) |
public MessageIdBuilder(Issue issue)
public EmailHeaderBuilders.MessageIdBuilder setSequence(int sequence)
public EmailHeaderBuilders.MessageIdBuilder setHostName(String hostName)
public EmailHeaderBuilders.MessageIdBuilder setDropMillis(boolean dropMillis)
public String build()
sequence
and hostname
are 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 to InReplyToHeaderBuilder
).Copyright © 2002-2022 Atlassian. All Rights Reserved.