BrightSide Workbench Full Report + Source Code
org.turro.mail.message.MailMessageTemplate Class Reference
Inheritance diagram for org.turro.mail.message.MailMessageTemplate:
Collaboration diagram for org.turro.mail.message.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, MailRecipient recipient)
 
String getMailTemplate (String template)
 
- Public Member Functions inherited from org.turro.mail.message.MailMessage
HtmlEmail getEmail ()
 
String getMessage ()
 
void setMessage (String message)
 
String getSubject ()
 
void setSubject (String subject)
 
MailProvider getProvider ()
 
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
 
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
 

Static Public Member Functions

static MailMessageTemplate of (MailProvider provider)
 

Protected Member Functions

 MailMessageTemplate (MailProvider provider)
 
- Protected Member Functions inherited from org.turro.mail.message.MailMessage
 MailMessage (MailProvider provider)
 

Additional Inherited Members

- Protected Attributes inherited from org.turro.mail.message.MailMessage
final MailProvider provider
 

Detailed Description

Constructor & Destructor Documentation

◆ MailMessageTemplate()

org.turro.mail.message.MailMessageTemplate.MailMessageTemplate ( MailProvider  provider)
protected

Definition at line 86 of file elephant-mail/src/main/java/org/turro/mail/message/MailMessageTemplate.java.

Here is the caller graph for this function:

Member Function Documentation

◆ getMailTemplate()

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

Definition at line 76 of file elephant-mail/src/main/java/org/turro/mail/message/MailMessageTemplate.java.

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

◆ of()

static MailMessageTemplate org.turro.mail.message.MailMessageTemplate.of ( MailProvider  provider)
static

Reimplemented from org.turro.mail.message.MailMessage.

Definition at line 82 of file elephant-mail/src/main/java/org/turro/mail/message/MailMessageTemplate.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setMessage() [1/5]

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

Definition at line 45 of file elephant-mail/src/main/java/org/turro/mail/message/MailMessageTemplate.java.

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

◆ setMessage() [2/5]

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

Definition at line 55 of file elephant-mail/src/main/java/org/turro/mail/message/MailMessageTemplate.java.

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

◆ setMessage() [3/5]

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

Definition at line 49 of file elephant-mail/src/main/java/org/turro/mail/message/MailMessageTemplate.java.

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

◆ setMessage() [4/5]

void org.turro.mail.message.MailMessageTemplate.setMessage ( ElephantMarker  marker,
String  template,
MailRecipient  recipient 
)

Definition at line 63 of file elephant-mail/src/main/java/org/turro/mail/message/MailMessageTemplate.java.

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

◆ setMessage() [5/5]

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

Definition at line 59 of file elephant-mail/src/main/java/org/turro/mail/message/MailMessageTemplate.java.

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

◆ setProcessLiveLinks()

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

Definition at line 41 of file elephant-mail/src/main/java/org/turro/mail/message/MailMessageTemplate.java.

41  {
42  this.processLiveLinks = processLiveLinks;
43  }
Here is the caller graph for this function:

◆ setRoot()

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

Definition at line 37 of file elephant-mail/src/main/java/org/turro/mail/message/MailMessageTemplate.java.

37  {
38  this.root = root;
39  }
Here is the caller graph for this function:

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