19 package org.turro.mail.impl;
21 import java.io.StringWriter;
22 import org.turro.string.Strings;
23 import org.turro.marker.ElephantMarker;
24 import org.turro.plugin.contacts.IContact;
34 private boolean processLiveLinks =
true;
41 this.processLiveLinks = processLiveLinks;
49 if(contact !=
null && contact.
isWebUser()) {
63 StringWriter sw =
new StringWriter();
64 marker.
put(
"message",
this);
66 String msg = sw.toString();
67 if(processLiveLinks && !recipient.
isEmpty()) {
76 return Strings.isBlank(
template) ?
"default-mail" :
template;
void setRoot(String root)
void setProcessLiveLinks(boolean processLiveLinks)
void setMessage(ElephantMarker marker, IContact contact)
String getMailTemplate(String template)
void setMessage(ElephantMarker marker, String template, IContact contact)
void setMessage(ElephantMarker marker, String template, Recipient recipient)
void setMessage(ElephantMarker marker, String template, String email, String name)
void setMessage(ElephantMarker marker, String email, String name)
static String processImgWidth(String message)
static String processLinks(IContact contact, String message)
static String processUser(IContact contact, String message)
static Recipient of(IContact contact)
void process(String rootTmpl, String tmpl)
Object put(Object key, Object value)