BrightSide Workbench Full Report + Source Code
org.turro.mail.impl.MailMessageTemplate Class Reference
Inheritance diagram for org.turro.mail.impl.MailMessageTemplate:
Collaboration diagram for org.turro.mail.impl.MailMessageTemplate:

Public Member Functions

void setRoot (String root)
 
void setProcessLiveLinks (boolean processLiveLinks)
 
void setMessage (ElephantMarker marker, IContact contact)
 
void setMessage (ElephantMarker marker, String template, IContact contact)
 
void setMessage (ElephantMarker marker, String email, String name)
 
void setMessage (ElephantMarker marker, String template, String email, String name)
 
void setMessage (ElephantMarker marker, String template, Recipient recipient)
 
String getMailTemplate (String template)
 
- Public Member Functions inherited from org.turro.mail.impl.MailMessage
 MailMessage ()
 
 MailMessage (String hostName, String user, String password)
 
HtmlEmail getEmail ()
 
void setHostName (String hostName)
 
void setPassword (String password)
 
void setUser (String user)
 
String getMessage ()
 
void setMessage (String message)
 
String getSubject ()
 
void setSubject (String subject)
 
String getPort ()
 
void setPort (String port)
 
String getTls ()
 
void setTls (String tls)
 
String getSsl ()
 
void setSsl (String ssl)
 
void attachRelative (String path, String description, String name)
 
void attach (String path, String description, String name)
 
void attachExternal (URL url, String description, String name)
 
void embedRelative (String name, String path)
 
void embed (String name, File file)
 
void embedExternal (String name, String url) throws MalformedURLException
 
void send () throws EmailException, MalformedURLException, NamingException
 
Email setFromIfNull (String email) throws EmailException
 
Date getSentDate ()
 
void setSentDate (Date date)
 
Email setFrom (String email, String name) throws EmailException
 
Email setFrom (String email) throws EmailException
 
Email addTo (String email, String name) throws EmailException
 
Email addTo (String email) throws EmailException
 
Email addReplyTo (String email, String name) throws EmailException
 
Email addReplyTo (String email) throws EmailException
 
void addHeader (String name, String value)
 
Email addCc (String email, String name) throws EmailException
 
Email addCc (String email) throws EmailException
 
Email addBcc (String email, String name) throws EmailException
 
Email addBcc (String email) throws EmailException
 
void setCharset (String newCharset)
 

Detailed Description

Member Function Documentation

◆ getMailTemplate()

String org.turro.mail.impl.MailMessageTemplate.getMailTemplate ( String  template)

Definition at line 75 of file elephant/src/main/java/org/turro/mail/impl/MailMessageTemplate.java.

75  {
76  return Strings.isBlank(template) ? "default-mail" : template;
77  }
Here is the caller graph for this function:

◆ setMessage() [1/5]

void org.turro.mail.impl.MailMessageTemplate.setMessage ( ElephantMarker  marker,
IContact  contact 
)

Definition at line 44 of file elephant/src/main/java/org/turro/mail/impl/MailMessageTemplate.java.

44  {
45  setMessage(marker, null, contact);
46  }
Here is the caller graph for this function:

◆ setMessage() [2/5]

void org.turro.mail.impl.MailMessageTemplate.setMessage ( ElephantMarker  marker,
String  email,
String  name 
)

Definition at line 54 of file elephant/src/main/java/org/turro/mail/impl/MailMessageTemplate.java.

54  {
55  setMessage(marker, null, Recipient.of(email, name));
56  }
Here is the call graph for this function:

◆ setMessage() [3/5]

void org.turro.mail.impl.MailMessageTemplate.setMessage ( ElephantMarker  marker,
String  template,
IContact  contact 
)

Definition at line 48 of file elephant/src/main/java/org/turro/mail/impl/MailMessageTemplate.java.

48  {
49  if(contact != null && contact.isWebUser()) {
50  setMessage(marker, template, Recipient.of(contact));
51  }
52  }
Here is the call graph for this function:

◆ setMessage() [4/5]

void org.turro.mail.impl.MailMessageTemplate.setMessage ( ElephantMarker  marker,
String  template,
Recipient  recipient 
)

Definition at line 62 of file elephant/src/main/java/org/turro/mail/impl/MailMessageTemplate.java.

62  {
63  StringWriter sw = new StringWriter();
64  marker.put("message", this);
65  marker.process("content" + (root == null ? "" : root), getMailTemplate(template), sw);
66  String msg = sw.toString();
67  if(processLiveLinks && !recipient.isEmpty()) {
68  msg = MailUtils.processLinks(recipient.getEmail(), msg);
69  }
70  msg = MailUtils.processUser(recipient, msg);
71  msg = MailUtils.processImgWidth(msg);
72  setMessage(msg);
73  }
Here is the call graph for this function:

◆ setMessage() [5/5]

void org.turro.mail.impl.MailMessageTemplate.setMessage ( ElephantMarker  marker,
String  template,
String  email,
String  name 
)

Definition at line 58 of file elephant/src/main/java/org/turro/mail/impl/MailMessageTemplate.java.

58  {
59  setMessage(marker, template, Recipient.of(email, name));
60  }
Here is the call graph for this function:

◆ setProcessLiveLinks()

void org.turro.mail.impl.MailMessageTemplate.setProcessLiveLinks ( boolean  processLiveLinks)

Definition at line 40 of file elephant/src/main/java/org/turro/mail/impl/MailMessageTemplate.java.

40  {
41  this.processLiveLinks = processLiveLinks;
42  }

◆ setRoot()

void org.turro.mail.impl.MailMessageTemplate.setRoot ( String  root)

Definition at line 36 of file elephant/src/main/java/org/turro/mail/impl/MailMessageTemplate.java.

36  {
37  this.root = root;
38  }

The documentation for this class was generated from the following file: