|
static boolean | silentEmailCheck (String emails) |
|
static boolean | isValidEmailAddress (String emails) |
|
static String | processMacrosForWeb (IContact contact, String message) |
|
static String | processMacros (IContact contact, String message) |
|
static String | processLinks (IContact contact, String message) |
|
static String | processLinks (String email, String message) |
|
static String | cleanLinks (String message) |
|
static String | processLiveLinks (String email, String message) |
|
static String | processLiveRefs (String email, String message) |
|
static String | cleanLiveLinks (String message) |
|
static String | cleanLiveRefs (String message) |
|
static String | processImgWidth (String message) |
|
static String | processUser (IContact contact, String message) |
|
static String | processUser (String email, String name, String message) |
|
static String | processUser (Recipient recipient, String message) |
|
◆ cleanLinks()
static String org.turro.mail.impl.MailUtils.cleanLinks |
( |
String |
message | ) |
|
|
static |
◆ cleanLiveLinks()
static String org.turro.mail.impl.MailUtils.cleanLiveLinks |
( |
String |
message | ) |
|
|
static |
Definition at line 146 of file elephant/src/main/java/org/turro/mail/impl/MailUtils.java.
147 if(message.contains(
"{livelink")) {
148 Pattern pat = Pattern.compile(LIVE_LINK_PATTERN);
149 Matcher mat = pat.matcher(message);
150 StringBuffer result =
new StringBuffer();
153 if(mat.groupCount() > 1 && !Strings.isBlank(mat.group(1)) && !Strings.isBlank(mat.group(2))) {
154 mat.appendReplacement(result,
"<a href='" + mat.group(2) +
"'>" + mat.group(1) +
"</a>");
156 }
catch (Exception ex) {
157 Logger.getLogger(MailUtils.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
160 mat.appendTail(result);
161 return result.toString();
◆ cleanLiveRefs()
static String org.turro.mail.impl.MailUtils.cleanLiveRefs |
( |
String |
message | ) |
|
|
static |
Definition at line 166 of file elephant/src/main/java/org/turro/mail/impl/MailUtils.java.
167 if(message.contains(
"{liveref")) {
168 Pattern pat = Pattern.compile(LIVE_REF_PATTERN);
169 Matcher mat = pat.matcher(message);
170 StringBuffer result =
new StringBuffer();
173 if(mat.groupCount() > 0 && !Strings.isBlank(mat.group(1))) {
174 mat.appendReplacement(result, mat.group(1));
176 }
catch (Exception ex) {
177 Logger.getLogger(MailUtils.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
180 mat.appendTail(result);
181 return result.toString();
◆ isValidEmailAddress()
static boolean org.turro.mail.impl.MailUtils.isValidEmailAddress |
( |
String |
emails | ) |
|
|
static |
◆ processImgWidth()
static String org.turro.mail.impl.MailUtils.processImgWidth |
( |
String |
message | ) |
|
|
static |
◆ processLinks() [1/2]
static String org.turro.mail.impl.MailUtils.processLinks |
( |
IContact |
contact, |
|
|
String |
message |
|
) |
| |
|
static |
Definition at line 80 of file elephant/src/main/java/org/turro/mail/impl/MailUtils.java.
81 if(contact !=
null && contact.isValid() && contact.isWebUser()) {
82 String email = contact.getConnector(IUser.CONNECTOR_EMAIL);
static String cleanLinks(String message)
static String processLinks(IContact contact, String message)
◆ processLinks() [2/2]
static String org.turro.mail.impl.MailUtils.processLinks |
( |
String |
email, |
|
|
String |
message |
|
) |
| |
|
static |
◆ processLiveLinks()
static String org.turro.mail.impl.MailUtils.processLiveLinks |
( |
String |
email, |
|
|
String |
message |
|
) |
| |
|
static |
Definition at line 102 of file elephant/src/main/java/org/turro/mail/impl/MailUtils.java.
103 if(message.contains(
"{livelink")) {
104 Pattern pat = Pattern.compile(LIVE_LINK_PATTERN);
105 Matcher mat = pat.matcher(message);
106 StringBuffer result =
new StringBuffer();
109 if(mat.groupCount() > 1 && !Strings.isBlank(mat.group(1)) && !Strings.isBlank(mat.group(2))) {
110 String server = ElephantContext.getServerUrl(
"http") +
"?" +
111 Actions.createActionFromElephant(email, URLDecoder.decode(mat.group(2), StandardCharsets.UTF_8.name()));
112 mat.appendReplacement(result,
"<a href=\"" + server +
"\">" + mat.group(1) +
"</a>");
114 }
catch (Exception ex) {
115 Logger.getLogger(MailUtils.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
118 mat.appendTail(result);
119 return result.toString();
◆ processLiveRefs()
static String org.turro.mail.impl.MailUtils.processLiveRefs |
( |
String |
email, |
|
|
String |
message |
|
) |
| |
|
static |
Definition at line 124 of file elephant/src/main/java/org/turro/mail/impl/MailUtils.java.
125 if(message.contains(
"{liveref")) {
126 Pattern pat = Pattern.compile(LIVE_REF_PATTERN);
127 Matcher mat = pat.matcher(message);
128 StringBuffer result =
new StringBuffer();
131 if(mat.groupCount() > 0 && !Strings.isBlank(mat.group(1))) {
132 String server = ElephantContext.getServerUrl(
"http") +
"?" +
133 Actions.createActionFromElephant(email, URLDecoder.decode(mat.group(1), StandardCharsets.UTF_8.name()));
134 mat.appendReplacement(result, server);
136 }
catch (Exception ex) {
137 Logger.getLogger(MailUtils.class.getName()).log(Level.SEVERE, ElephantContext.logMsg(
null), ex);
140 mat.appendTail(result);
141 return result.toString();
◆ processMacros()
static String org.turro.mail.impl.MailUtils.processMacros |
( |
IContact |
contact, |
|
|
String |
message |
|
) |
| |
|
static |
◆ processMacrosForWeb()
static String org.turro.mail.impl.MailUtils.processMacrosForWeb |
( |
IContact |
contact, |
|
|
String |
message |
|
) |
| |
|
static |
◆ processUser() [1/3]
static String org.turro.mail.impl.MailUtils.processUser |
( |
IContact |
contact, |
|
|
String |
message |
|
) |
| |
|
static |
◆ processUser() [2/3]
static String org.turro.mail.impl.MailUtils.processUser |
( |
Recipient |
recipient, |
|
|
String |
message |
|
) |
| |
|
static |
◆ processUser() [3/3]
static String org.turro.mail.impl.MailUtils.processUser |
( |
String |
email, |
|
|
String |
name, |
|
|
String |
message |
|
) |
| |
|
static |
◆ silentEmailCheck()
static boolean org.turro.mail.impl.MailUtils.silentEmailCheck |
( |
String |
emails | ) |
|
|
static |
The documentation for this class was generated from the following file: