Customizing Email Notifications

Customizing the Email “From” Address

All email notifications are sent from a single email address in LiveWhale. In some cases like RSVP confirmations, the “Reply-To” address and “From Name” is set to that of the event organizer, so registrants can reply to their confirmation email and you’ll receive it.

To configure the global “From” address, open the master LiveWhale config (/livewhale/core/config.php) for editing and change the following lines:

$GLOBALS['LIVEWHALE_CONFIG']['FROM_ADDRESS']='noreply@myschool.edu';
$GLOBALS['LIVEWHALE_CONFIG']['FROM_NAME']='LiveWhale CMS';

Some email servers may flag emails with “@myschool.edu” in the “From Name” as suspicious, so in LiveWhale 1.7.1+, you can elect to always use the FROM_NAME instead of having it overwritten by the event or form organizer.

$GLOBALS['LIVEWHALE_CONFIG']['FROM_ADDRESS']='noreply@myschool.edu';
$GLOBALS['LIVEWHALE_CONFIG']['FROM_NAME']='LiveWhale CMS';
$GLOBALS['LIVEWHALE_CONFIG']['ALWAYS_USE_FROM_NAME']=true; // don't override FROM_NAME with event organizer email

Sending Email via SMTP

To have LiveWhale send notification emails using a remote SMTP server, follow these steps:

  1. Open the master LiveWhale config (/livewhale/core/config.php) for editing
  2. Locate the HOSTS array, $GLOBALS['LIVEWHALE_CONFIG']['HOSTS']
  3. Specify the SMTP connectivity for each of your hosts (See table below for setting descriptions) This example assumes you are using Gmail via Google Apps:
'SMTP_HOST'=>'smtp.google.com',
'SMTP_PORT'=>587,
'SMTP_USER'=>'do-not-reply@yourdomain.edu',
​'SMTP_PASS'=>'your-password',

Note: For a normal (non-Google Apps) Gmail account, use the host smtp.gmail.com. Also note, you’ll need to login and tell Gmail to allow access from “less-secure apps” in order for LiveWhale to be able to access their SMTP service.

Name Description
SMTP_HOST Set this to the hostname for the SMTP server.
SMTP_PORT Specify the port for the SMTP server. For TLS, it is typically 587 (recommended). For SSL, 465. Otherwise, 25.
SMTP_USER Set this to the user that you will authenticate to the SMTP server as. All system email notifications from LiveWhale will be sent as “from” this user. We recommend creating a dedicated do-not-reply@yourdomain.edu account for this. If you are using Google Apps / Gmail, this account can be configured to delete all email it receives (although you may want to instead watch for missed help requests from your users). Note that the “reply-to” address can be customized, so you will not necessarily receive any email at this address.
SMTP_PASS Set this to the password for the associated SMTP user.
SMTP_ALLOW_INSECURE By default, LiveWhale checks for a valid (not self-signed) certificate from your SMTP server. Setting 'SMTP_ALLOW_INSECURE'=>true disables that security check to permit a self-signed certificate from your SMTP server, or any other situation where the certificate is invalid.
SMTP_FROM_ADDRESS By default, LiveWhale uses your SMTP_USER as the From address of your emails. If your SMTP server doesn’t use a full email address as the username—or if they don’t match—you can provide the correct From address using this config setting.
SMTP_CERT_FILE
SMTP_KEY_FILE
SMTP_KEY_PASS
If your SMTP server supports sending of S-MIME emails, you can provide paths for cert and key files (as relative paths from livewhale/integrations/) and a key pass.

Customizing Notification Emails

You can customize all notification emails, inside and out.

Default template files you can copy and modify are located in /public_html/livewhale/notifications/.

To customize any of those templates, make a copy of that file and upload it to /_ingredients/notifications/. Then you can make any changes you like to that version.

(If you customized your notification template in an earlier version of LiveWhale, those files might be in /livewhale/client/modules/messages/includes/ – you can move those HTML files into /_ingredients/notifications/ so everything is in one place.)

Master Templates

The master templates email_subject.html and email_template.html are the starting place for every email. Inside these master templates, the subject and body variables are generated using the appropriate template (e.g., rsvp_confirmation_subject.html and rsvp_confirmation_body.html). They support the following variables:

  • client (the contents of $_LW->CONFIG['CLIENT_NAME'])
  • subject (the contents of [notification_type]_subject.html)
  • body (the contents of [notification_type]_subject.html)
  • first_name
  • last_name
  • email
  • date
  • time
  • type (the module sending the notification)
  • header (the contents of $_LW->CONFIG['EMAIL_HEADER'], for backwards-compatibility)
  • footer (the contents of $_LW->CONFIG['EMAIL_FOOTER'], for backwards-compatibility)

Advanced: to edit/process any existing email variables, or to add your own variables to use in templates, use a custom module with the onFormatMessageVars handler.

Visitor Notifications  

Name Description Available XPHP Variables
form_confirmation
(LiveWhale CMS)
Sent to form submitter (if configured) title, body (list of submitted data), time, date
payment_receipt Sent to payee when their payment is made thank_you_message (form field lw_payments_field_thank_you), description, quantity, total, first_name, last_name, email, phone, address, city, state, zip, country
public_submission_confirmation Sent to public submission submitter (if configured) name (Firstname Lastname of who submitted), email, type (event, news, image), title, summary, description, contact_info, event_time (if event), event_time2 (if event) event_date (if event), event_date2 (if event), location (if event), url (if submitted)
rsvp_announcement Sent to registrants when event organizer chooses “Email all registrants” first_name, last_name, message, title (Event title), event_time, event_date, event_summary, contact_info (event contact info), ical_url, cancel_url
rsvp_confirmation Sent to registrant when they RSVP first_name, last_name, email, phone, quantity, comments, waitlisted (Yes or No), title (Event title), event_time, event_date, event_summary, time, date, wait_list_message (contains message only if registrant is waitlisted), contact_info (event contact info), ical_url, cancel_url, registration_response (if configured, otherwise “Your registration has been received.”)
Note: You can also include any custom fields added to the event as custom_my_variable.
rsvp_waitlist Sent to registrant when they get off the waitlist first_name, last_name, email, phone, quantity, comments, title (Event title), event_time, event_date, event_summary, contact_info (event contact info), ical_url, cancel_url
saveandshare Sent to recipient(s) when a visitor uses the “Email” saveandshare name (Sender’s name), page_title, message, url

Editor Notifications  

Name Description Available XPHP Variables
blog_moderator
(LiveWhale CMS)
Sent to blog moderator(s) when a new post is made to their blog name (Firstname Lastname of who posted), title, url, blog_title
bulletin Sent to all users when they receive a bulletin title, body
content_accepted Sent to group when their suggestion is accepted name (Firstname Lastname of who accepted), group, type, title, url
content_deleted Sent to group when their linked copy of a suggestion has its original deleted (yours gets deleted) name (Firstname Lastname of who deleted), group_from (where it was deleted), group_to (where mine had been), type, title, url, time, date
content_expired
(LiveWhale CMS)
Sent to group when their scheduled content expires type, title, time, date, manager_url
content_original_hidden Sent to group when their linked copy of a suggestion has its original hidden (yours gets hidden) group_from (where original was hidden), group_to (where mine is), type, title, manager_url
content_original_unhidden Sent to group when their linked copy of a suggestion has its original unhidden (you may choose to unhide) group_from (where original was hidden), group_to (where mine is), type, title, manager_url
content_rejected Sent to group when their suggestion is declined name (Firstname Lastname of who declined), group, type, title, url
content_scheduled Sent to group when their scheduled content goes live type, title, url, time, date, manager_url
content_suggested Sent to group when content is suggested to them name (Firstname Lastname of who suggested), group_from, group_to, type, title, url, manager_url
form_notification Sent to form owner(s) upon submission (if configured) title, body (list of submitted data), time, date
page_changed
(LiveWhale CMS)
Sent to page owner(s) when a change has been made (if requested) url, title, time, date, unsubscribe_url
page_note
(LiveWhale CMS)
Sent to page owner(s) when a note has been posted name (Firstname Lastname of who posted it), url, title (Page title), note, time, date
page_reminder
(LiveWhale CMS)
Sent to page owner(s) on a weekly/monthly/annual basis (if requested) url, title (Page title), frequency (weekly,monthly,annual)
password_reset
(Password mode only)
Sent to CMS user when they choose “Forgot password?” username, reset_link
payment_confirmation Sent to form owner when a payment is made (if configured) description, quantity, total, first_name, last_name, email, phone, address, city, state, zip, country, payment_method (online, no payment, checks, bill me)
public_submission_notification Sent to group members or configured email(s) when a public submission is received name (Firstname Lastname of who submitted), email, type (event, news, image), title, summary, description, contact_info, event_time (if event), event_time2 (if event) event_date (if event), event_date2 (if event), location (if event), url (if submitted), edit_url
rsvp_notification Sent to event organizer when someone RSVPs first_name, last_name, email, phone, quantity, comments, waitlisted, title (Event title), event_time, event_date, event_summary, time, date, wait_list_message, contact_info (event contact info), registrations_url
Note: You can also include any custom fields added to the event as custom_my_variable.
support Sent to support email when CMS user submits dashboard form name, email, message, browser, ip (IP address of visitor)

On this page