public class MailBasedPostingHelper extends Object
Modifier and Type | Method and Description |
---|---|
static String |
createMessageIdentifier(Note note)
Creates a message identifier that uniquely identifies a note and can be used as part of a
Message-ID email header.
|
static Long |
extractNoteIdFromMessageIdentifier(String messageIdentifier)
Extracts the ID of a note from a message identifier that was previously created with
createMessageIdentifier(Note) . |
static String |
getBlogEmailAddress(String blogIdentifier)
Returns the blog email address of a blog identified by its name identifier.
|
static String |
getBlogMailTo(String alias)
Returns the mailto string to be inserted as href value to render a link of the email address
of a blog.
|
static String |
getBlogMailToFromEmailAddress(String emailAddress,
String alias)
Returns the mailto string to be inserted as href value to render a link of the email address
of a blog.
|
static String |
getClientWideBlogEmailAddressSuffix()
Returns the blog email address without the leading blog name identifier.
|
static String |
getClientWideBlogEmailAddressSuffix(String clientId)
Returns the blog email address without the leading blog name identifier.
|
static String |
getCurrentEmailServerDomain()
Returns the email server domain (e.g.
|
static String |
getStaticMailAddressSuffix()
The static part at the end of the local name of an email address (e.g.
|
static boolean |
isMailFetchingEnabled()
Returns whether the mail fetcher is enable by checking the configuration properties.
|
static boolean |
isRunningInSingleAddressMode()
Returns true if the mail fetcher is configured to run in single address mode, which means
that there is only one address to receive mail based postings and the blog name ID is
searched inside the email's subject.
|
public static String createMessageIdentifier(Note note)
note
- the note for which the identifier is to be createdpublic static Long extractNoteIdFromMessageIdentifier(String messageIdentifier)
createMessageIdentifier(Note)
.messageIdentifier
- the identifier to parsepublic static String getBlogEmailAddress(String blogIdentifier)
blogIdentifier
- the name identifier of the bloggetCurrentEmailServerDomain()
returns nullpublic static String getBlogMailTo(String alias)
alias
- the alias of the blogpublic static String getBlogMailToFromEmailAddress(String emailAddress, String alias)
emailAddress
- the email address of the blogalias
- the alias of the blogpublic static String getClientWideBlogEmailAddressSuffix()
getCurrentEmailServerDomain()
returns
nullpublic static String getClientWideBlogEmailAddressSuffix(String clientId)
clientId
- The client id.getCurrentEmailServerDomain()
returns
nullpublic static String getCurrentEmailServerDomain()
public static String getStaticMailAddressSuffix()
public static boolean isMailFetchingEnabled()
public static boolean isRunningInSingleAddressMode()
Copyright © 2019 Communote team. All rights reserved.