]> git.mxchange.org Git - addressbook-mailer-lib.git/blobdiff - src/org/mxchange/addressbook/mailer/model/delivery/AddressbookMailer.java
Continued a bit:
[addressbook-mailer-lib.git] / src / org / mxchange / addressbook / mailer / model / delivery / AddressbookMailer.java
index a07441695025567a9230d06aac4b4fffa4469346..98a8a0660f41f6df7a0a5edf172b9422e6d62668 100644 (file)
@@ -23,6 +23,7 @@ import javax.mail.MessagingException;
 import javax.mail.Session;
 import org.apache.velocity.Template;
 import org.apache.velocity.VelocityContext;
+import org.mxchange.jcoreee.utils.FacesUtils;
 import org.mxchange.jmailee.model.delivery.BaseMailer;
 import org.mxchange.jmailee.model.delivery.wrapper.WrapableEmailDelivery;
 
@@ -79,6 +80,12 @@ public class AddressbookMailer extends BaseMailer implements DeliverableAddressb
                // Init context
                VelocityContext context = new VelocityContext();
 
+               // Get base URL from JSF
+               String baseUrl = FacesUtils.generateBaseUrl();
+
+               // ... and set it (for all templates the same)
+               context.put("baseUrl", baseUrl); //NOI18N
+
                // Are some variables set?
                if ((emailWrapper.getTemplateVariables() != null) && (!emailWrapper.getTemplateVariables().isEmpty())) {
                        // Add all variables