19 package org.turro.mail.impl;
21 import org.turro.plugin.contacts.IContact;
22 import org.turro.string.Strings;
32 this.friendly = friendly;
58 return Strings.isBlank(email);
63 public String
parse(String text) {
64 if(!Strings.isBlank(email)) {
65 text = text.replaceAll(
"\\{email\\}", email);
67 if(!Strings.isBlank(name)) {
68 text = text.replaceAll(
"\\{name\\}", name);
70 if(!Strings.isBlank(friendly)) {
71 text = text.replaceAll(
"\\{friendly\\}", friendly);
73 if(!Strings.isBlank(formal)) {
74 text = text.replaceAll(
"\\{formal\\}", formal);
91 private final String email, name;
92 private String friendly, formal;
94 private Recipient(String email, String name) {
static Recipient of(IContact contact)
Recipient friendly(String friendly)
Recipient formal(String formal)
static Recipient of(String email, String name)
String parse(String text)