Forum Discussion
Format of Email Alerts is Terrible
Hello! You have my support! Prepare as an idea and publish! It's worth really improving!
- DeletedMar 01, 2024
- DeletedMar 01, 2024
Deleted
Update: This issue has long since been fixed, this is an outdated thread.
- AllenMar 02, 2024Community Manager
Deleted
As much as I appreciate the update A1, I think I would characterize the emails today as better, not fixed.
The issue we have with emails all starts with the fact the email templating language the community uses is, frankly, awful. Its a language called velocity that underpins the actual templates themselves, example:
Come visit us at <a href="${emailUrls.getFrontPageUrl}">$community.title</a>!
Now keep in mind all the above is going to say is "Come visit us at Community Hub" and this includes no formatting or layout and then take a look at the complexity of some of the emails we send and you begin to understand the issue.
As if that wasn't enough we need to provide plain html versions as well for users who turn off html emails and then on top of that each email client renders html emails in different ways. For example in website design you wouldn't usually use a table to structure the page (its not the 90s) but in email your often forced to because the email clients don't implement full HTML support so you can't use some HTML with some CSS or even inline styling.
This is the full code that generates the email which tells you a question has been accepted as a solution:
== .html_content == ${email.template.html-start-to-before-head-title} <!-- head title START --> #if($isAccepter) You marked your answer on ${community.title} as an accepted solution! #else Your answer on ${community.title} has been accepted as a solution! #end <!-- head title END --> ${email.template.after-head-title-to-before-header-logo} <!-- Header logo image START --> ${email.template.header-logo} <!-- Header logo image END --> ${email.template.after-header-logo-to-before-h1-headline} <!-- h1 headline START --> #if($isAccepter) You marked your answer as a solution #else Your answer was marked as a solution #end <!-- h1 headline END --> ${email.template.after-h1-headline-to-before-custom-image} <!-- Custom image START --> ${email.template.custom-image} <!-- Custom image END --> ${email.template.after-custom-image-to-before-reply-demarcation} ${email.template.after-reply-demarcation-to-before-h2-salutation} <!-- h2 salutation START --> Hi ${notification.recipient.login},<br /> #if($isAccepter) Great job! You marked your answer to a question as an accepted solution! #else Great job! ${actorLogin} marked your answer to a question as an accepted solution! #end <!-- h2 salutation END --> ${email.template.after-h2-salutation-to-before-message-details} <!-- Message details START --> ${email.template.message-details.1.start} Subject: <a href="${notification.message.webUi.url}">${parentSubject}</a><br /> Date: ${notification.threadFormattedDate}<br /> ${email.template.message-details.1.end} #if (${notification.emailContentFormat.name} == "subject_and_body") ${email.template.message-details.2.start} ${notification.message.body} ${email.template.message-details.2.end} #end <!-- Message details END --> ${email.template.after-message-details-to-before-action-button} <!-- Action button START --> ${email.template.action-button.top} <a href="${notification.message.webUi.url}" style="${email.template.action-button.link-style}"> ${email.template.action-button.link-markup.start} View ${email.template.action-button.link-markup.end} </a> ${email.template.action-button.bottom} <!-- Action button END --> ${email.template.after-action-button-to-before-contextual-links} <!-- Contextual links START --> Want to help some more? Go back to <a href="${emailUrls.getFrontPageUrl()}">${community.title}</a> to see if there is anything else you can answer.<br /> To manage your notifications, <a href="${notification.webUi.url}">click here</a>.<br /> If this link doesn't work:<br /> 1. Log on to ${community.title}.<br /> 2. Click <b>My Profile</b>.<br /> 3. Click the <b>Subscriptions & Notifications</b> tab.<br /> 4. Change your settings and click <b>Save Changes</b>. <!-- Contextual links END --> ${email.template.after-contextual-links-to-before-footer-content} <!-- Footer content START --> ${email.template.footer-content.1} ${email.template.footer-content.2} ${email.template.footer-content.3} ${email.template.footer-content.4} <!-- Footer content END --> ${email.template.after-footer-content-to-before-footer-logo} <!-- Footer logo image START --> ${email.template.footer-logo} <!-- Footer logo image END --> ${email.template.after-footer-logo-to-html-end} == .subject == #if($isAccepter) You marked your answer on ${community.title} as an accepted solution!#else Your answer on ${community.title} has been accepted as a solution!#end == .text_content == Hi ${notification.recipient.login}, #if($isAccepter) Great job! You marked your answer to a question as an accepted solution! #else Great job! ${actorLogin} marked your answer to a question as an accepted solution! #end Subject:#if ($parentSubject) ${tools.unescapeHtml($parentSubject)} #else ${parentSubject} #end Date: ${notification.threadFormattedDate} #if (${notification.emailContentFormat.name} == "subject_and_body") ${notification.message.body} #else View the message in the community: ${notification.message.webUi.url} #end Want to help some more? Go back to ${emailUrls.getFrontPageUrl()} to see if there is anything else you can answer. ==================================================================================== Thanks for being a ${community.title} member. To manage your notifications, please go to: ${notification.webUi.url} If this link doesn't work: 1. Log on to ${community.title}. 2. Click My Settings. 3. Click the Subscriptions & Notifications tab. 4. Change your settings and click Save Changes. Thanks for being a ${community.title} member. Your ${community.title} Team ${community.title} sent this message to $user.email. Don't want to receive emails from us? Just click this link: ${emailUrls.getTapestryUrl("/user/RemoveUserEmailPage/user-id/$user.id/mail-message-tracking/$trackingKey")}
So in summary, yes they are better than they were but I would love to make them better, the good news is that the whole email templating language and editor is being overhauled this year and so, while it might get worse before it gets better, I am confident we will be able to get to a much better place with emails in the next 12-18 months.