mirror of
https://github.com/mattermost/mattermost.git
synced 2025-02-25 18:55:24 -06:00
[MM-35039] - Send trial ended email (#17478)
* [MM-35039] - Send trial ended email * Generations * Use First name with fallback to username * Use First name with fallback to username for trial ending email
This commit is contained in:
@@ -421,6 +421,11 @@ func handleCWSWebhook(c *Context, w http.ResponseWriter, r *http.Request) {
|
||||
c.Err = appErr
|
||||
return
|
||||
}
|
||||
case model.EventTypeTrialEnded:
|
||||
if appErr := c.App.SendCloudTrialEndedEmail(); appErr != nil {
|
||||
c.Err = appErr
|
||||
return
|
||||
}
|
||||
|
||||
default:
|
||||
c.Err = model.NewAppError("Api4.handleCWSWebhook", "api.cloud.cws_webhook_event_missing_error", nil, "", http.StatusNotFound)
|
||||
|
||||
@@ -952,6 +952,7 @@ type AppIface interface {
|
||||
SendAutoResponse(channel *model.Channel, receiver *model.User, post *model.Post) (bool, *model.AppError)
|
||||
SendAutoResponseIfNecessary(channel *model.Channel, sender *model.User, post *model.Post) (bool, *model.AppError)
|
||||
SendCloudTrialEndWarningEmail(trialEndDate, siteURL string) *model.AppError
|
||||
SendCloudTrialEndedEmail() *model.AppError
|
||||
SendEmailVerification(user *model.User, newEmail, redirect string) *model.AppError
|
||||
SendEphemeralPost(userID string, post *model.Post) *model.Post
|
||||
SendNotifications(post *model.Post, team *model.Team, channel *model.Channel, sender *model.User, parentPostList *model.PostList, setOnline bool) ([]string, error)
|
||||
|
||||
36
app/cloud.go
36
app/cloud.go
@@ -186,7 +186,11 @@ func (a *App) SendCloudTrialEndWarningEmail(trialEndDate, siteURL string) *model
|
||||
countNotOks := 0
|
||||
|
||||
for admin := range sysAdmins {
|
||||
err := a.Srv().EmailService.SendCloudTrialEndWarningEmail(sysAdmins[admin].Email, sysAdmins[admin].Username, trialEndDate, sysAdmins[admin].Locale, siteURL)
|
||||
name := sysAdmins[admin].FirstName
|
||||
if name == "" {
|
||||
name = sysAdmins[admin].Username
|
||||
}
|
||||
err := a.Srv().EmailService.SendCloudTrialEndWarningEmail(sysAdmins[admin].Email, name, trialEndDate, sysAdmins[admin].Locale, siteURL)
|
||||
if err != nil {
|
||||
a.Log().Error("Error sending trial ending warning to", mlog.String("email", sysAdmins[admin].Email), mlog.Err(err))
|
||||
countNotOks++
|
||||
@@ -200,3 +204,33 @@ func (a *App) SendCloudTrialEndWarningEmail(trialEndDate, siteURL string) *model
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
func (a *App) SendCloudTrialEndedEmail() *model.AppError {
|
||||
sysAdmins, e := a.getSysAdminsEmailRecipients()
|
||||
if e != nil {
|
||||
return e
|
||||
}
|
||||
|
||||
// we want to at least have one email sent out to an admin
|
||||
countNotOks := 0
|
||||
|
||||
for admin := range sysAdmins {
|
||||
name := sysAdmins[admin].FirstName
|
||||
if name == "" {
|
||||
name = sysAdmins[admin].Username
|
||||
}
|
||||
|
||||
err := a.Srv().EmailService.SendCloudTrialEndedEmail(sysAdmins[admin].Email, name, sysAdmins[admin].Locale, *a.Config().ServiceSettings.SiteURL)
|
||||
if err != nil {
|
||||
a.Log().Error("Error sending trial ended email to", mlog.String("email", sysAdmins[admin].Email), mlog.Err(err))
|
||||
countNotOks++
|
||||
}
|
||||
}
|
||||
|
||||
// if not even one admin got an email, we consider that this operation errored
|
||||
if countNotOks == len(sysAdmins) {
|
||||
return model.NewAppError("app.SendCloudTrialEndedEmail", "app.user.send_emails.app_error", nil, "", http.StatusInternalServerError)
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
31
app/email.go
31
app/email.go
@@ -290,13 +290,13 @@ func (es *EmailService) sendWelcomeEmail(userID string, email string, verified b
|
||||
return nil
|
||||
}
|
||||
|
||||
func (es *EmailService) SendCloudTrialEndWarningEmail(userEmail, userName, trialEndDate, locale, siteURL string) *model.AppError {
|
||||
func (es *EmailService) SendCloudTrialEndWarningEmail(userEmail, name, trialEndDate, locale, siteURL string) *model.AppError {
|
||||
T := i18n.GetUserTranslations(locale)
|
||||
subject := T("api.templates.cloud_trial_ending_email.subject")
|
||||
|
||||
data := es.newEmailTemplateData(locale)
|
||||
data.Props["Title"] = T("api.templates.cloud_trial_ending_email.title")
|
||||
data.Props["SubTitle"] = T("api.templates.cloud_trial_ending_email.subtitle", map[string]interface{}{"Username": userName, "TrialEnd": trialEndDate})
|
||||
data.Props["SubTitle"] = T("api.templates.cloud_trial_ending_email.subtitle", map[string]interface{}{"Name": name, "TrialEnd": trialEndDate})
|
||||
data.Props["SiteURL"] = siteURL
|
||||
data.Props["ButtonURL"] = fmt.Sprintf("%s/admin_console/billing/subscription", siteURL)
|
||||
data.Props["Button"] = T("api.templates.cloud_trial_ending_email.add_payment_method")
|
||||
@@ -314,6 +314,33 @@ func (es *EmailService) SendCloudTrialEndWarningEmail(userEmail, userName, trial
|
||||
return nil
|
||||
}
|
||||
|
||||
func (es *EmailService) SendCloudTrialEndedEmail(userEmail, name, locale, siteURL string) *model.AppError {
|
||||
T := i18n.GetUserTranslations(locale)
|
||||
subject := T("api.templates.cloud_trial_ended_email.subject")
|
||||
|
||||
t := time.Now()
|
||||
todayDate := fmt.Sprintf("%s %d, %d", t.Month(), t.Day(), t.Year())
|
||||
|
||||
data := es.newEmailTemplateData(locale)
|
||||
data.Props["Title"] = T("api.templates.cloud_trial_ended_email.title")
|
||||
data.Props["SubTitle"] = T("api.templates.cloud_trial_ended_email.subtitle", map[string]interface{}{"Name": name, "TodayDate": todayDate})
|
||||
data.Props["SiteURL"] = siteURL
|
||||
data.Props["ButtonURL"] = fmt.Sprintf("%s/admin_console/billing/subscription", siteURL)
|
||||
data.Props["Button"] = T("api.templates.cloud_trial_ended_email.start_subscription")
|
||||
data.Props["QuestionTitle"] = T("api.templates.questions_footer.title")
|
||||
data.Props["QuestionInfo"] = T("api.templates.questions_footer.info")
|
||||
|
||||
body, err := es.srv.TemplatesContainer().RenderToString("cloud_trial_ended_email", data)
|
||||
if err != nil {
|
||||
return model.NewAppError("SendCloudTrialEndedEmail", "api.user.cloud_trial_ended_email.error", nil, err.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
|
||||
if err := es.sendMail(userEmail, subject, body); err != nil {
|
||||
return model.NewAppError("SendCloudTrialEndedEmail", "api.user.cloud_trial_ended_email.error", nil, err.Error(), http.StatusInternalServerError)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
// SendCloudWelcomeEmail sends the cloud version of the welcome email
|
||||
func (es *EmailService) SendCloudWelcomeEmail(userEmail, locale, teamInviteID, workSpaceName, dns, siteURL string) *model.AppError {
|
||||
T := i18n.GetUserTranslations(locale)
|
||||
|
||||
@@ -14125,6 +14125,28 @@ func (a *OpenTracingAppLayer) SendCloudTrialEndWarningEmail(trialEndDate string,
|
||||
return resultVar0
|
||||
}
|
||||
|
||||
func (a *OpenTracingAppLayer) SendCloudTrialEndedEmail() *model.AppError {
|
||||
origCtx := a.ctx
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(a.ctx, "app.SendCloudTrialEndedEmail")
|
||||
|
||||
a.ctx = newCtx
|
||||
a.app.Srv().Store.SetContext(newCtx)
|
||||
defer func() {
|
||||
a.app.Srv().Store.SetContext(origCtx)
|
||||
a.ctx = origCtx
|
||||
}()
|
||||
|
||||
defer span.Finish()
|
||||
resultVar0 := a.app.SendCloudTrialEndedEmail()
|
||||
|
||||
if resultVar0 != nil {
|
||||
span.LogFields(spanlog.Error(resultVar0))
|
||||
ext.Error.Set(span, true)
|
||||
}
|
||||
|
||||
return resultVar0
|
||||
}
|
||||
|
||||
func (a *OpenTracingAppLayer) SendEmailVerification(user *model.User, newEmail string, redirect string) *model.AppError {
|
||||
origCtx := a.ctx
|
||||
span, newCtx := tracing.StartSpanWithParentByContext(a.ctx, "app.SendEmailVerification")
|
||||
|
||||
22
i18n/en.json
22
i18n/en.json
@@ -3126,6 +3126,22 @@
|
||||
"id": "api.templates.at_limit_title",
|
||||
"translation": "You’ve reached the user limit for the free tier "
|
||||
},
|
||||
{
|
||||
"id": "api.templates.cloud_trial_ended_email.start_subscription",
|
||||
"translation": "Start subscription"
|
||||
},
|
||||
{
|
||||
"id": "api.templates.cloud_trial_ended_email.subject",
|
||||
"translation": "Mattermost cloud trial has ended"
|
||||
},
|
||||
{
|
||||
"id": "api.templates.cloud_trial_ended_email.subtitle",
|
||||
"translation": "{{.Name}}, your 14-day free trial of Mattermost Cloud Professional ends today {{.TodayDate}}. Please add your payment information to ensure your team can continue enjoying the benefits of Cloud Professional."
|
||||
},
|
||||
{
|
||||
"id": "api.templates.cloud_trial_ended_email.title",
|
||||
"translation": "Your free 14-day trial of Mattermost ends today"
|
||||
},
|
||||
{
|
||||
"id": "api.templates.cloud_trial_ending_email.add_payment_method",
|
||||
"translation": "Add Payment method"
|
||||
@@ -3136,7 +3152,7 @@
|
||||
},
|
||||
{
|
||||
"id": "api.templates.cloud_trial_ending_email.subtitle",
|
||||
"translation": "{{.Username}}, your 14-day trial of Mattermost Cloud Professional is ending in 3 days, on {{.TrialEnd}}. Please add your payment information to ensure your team can continue enjoying the benefits of Cloud Professional."
|
||||
"translation": "{{.Name}}, your 14-day trial of Mattermost Cloud Professional is ending in 3 days, on {{.TrialEnd}}. Please add your payment information to ensure your team can continue enjoying the benefits of Cloud Professional."
|
||||
},
|
||||
{
|
||||
"id": "api.templates.cloud_trial_ending_email.title",
|
||||
@@ -3846,6 +3862,10 @@
|
||||
"id": "api.user.check_user_password.invalid.app_error",
|
||||
"translation": "Login failed because of invalid password."
|
||||
},
|
||||
{
|
||||
"id": "api.user.cloud_trial_ended_email.error",
|
||||
"translation": "Failed to send trial ended email"
|
||||
},
|
||||
{
|
||||
"id": "api.user.cloud_trial_ending_email.error",
|
||||
"translation": "Failed to send trial ending warning email"
|
||||
|
||||
@@ -10,6 +10,7 @@ const (
|
||||
EventTypeFailedPaymentNoCard = "failed-payment-no-card"
|
||||
EventTypeSendAdminWelcomeEmail = "send-admin-welcome-email"
|
||||
EventTypeTrialWillEnd = "trial-will-end"
|
||||
EventTypeTrialEnded = "trial-ended"
|
||||
JoinLimitation = "join"
|
||||
InviteLimitation = "invite"
|
||||
)
|
||||
|
||||
442
templates/cloud_trial_ended_email.html
Normal file
442
templates/cloud_trial_ended_email.html
Normal file
@@ -0,0 +1,442 @@
|
||||
{{define "cloud_trial_ended_email"}}
|
||||
|
||||
<!-- FILE: cloud_trial_ended_email.mjml -->
|
||||
<!doctype html>
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office">
|
||||
|
||||
<head>
|
||||
<title>
|
||||
</title>
|
||||
<!--[if !mso]><!-->
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<!--<![endif]-->
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<style type="text/css">
|
||||
#outlook a {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
-webkit-text-size-adjust: 100%;
|
||||
-ms-text-size-adjust: 100%;
|
||||
}
|
||||
|
||||
table,
|
||||
td {
|
||||
border-collapse: collapse;
|
||||
mso-table-lspace: 0pt;
|
||||
mso-table-rspace: 0pt;
|
||||
}
|
||||
|
||||
img {
|
||||
border: 0;
|
||||
height: auto;
|
||||
line-height: 100%;
|
||||
outline: none;
|
||||
text-decoration: none;
|
||||
-ms-interpolation-mode: bicubic;
|
||||
}
|
||||
|
||||
p {
|
||||
display: block;
|
||||
margin: 13px 0;
|
||||
}
|
||||
</style>
|
||||
<!--[if mso]>
|
||||
<xml>
|
||||
<o:OfficeDocumentSettings>
|
||||
<o:AllowPNG/>
|
||||
<o:PixelsPerInch>96</o:PixelsPerInch>
|
||||
</o:OfficeDocumentSettings>
|
||||
</xml>
|
||||
<![endif]-->
|
||||
<!--[if lte mso 11]>
|
||||
<style type="text/css">
|
||||
.mj-outlook-group-fix { width:100% !important; }
|
||||
</style>
|
||||
<![endif]-->
|
||||
<style type="text/css">
|
||||
@media only screen and (min-width:480px) {
|
||||
.mj-column-per-100 {
|
||||
width: 100% !important;
|
||||
max-width: 100%;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style media="screen and (min-width:480px)">
|
||||
.moz-text-html .mj-column-per-100 {
|
||||
width: 100% !important;
|
||||
max-width: 100%;
|
||||
}
|
||||
</style>
|
||||
<style type="text/css">
|
||||
@media only screen and (max-width:480px) {
|
||||
table.mj-full-width-mobile {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
td.mj-full-width-mobile {
|
||||
width: auto !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
<style type="text/css">
|
||||
@import url(https://fonts.googleapis.com/css?family=Open+Sans:300,400,500,600,700);
|
||||
|
||||
.emailBody {
|
||||
background: #F3F3F3 !important;
|
||||
}
|
||||
|
||||
.emailBody a {
|
||||
text-decoration: none !important;
|
||||
color: #166DE0 !important;
|
||||
}
|
||||
|
||||
.title div {
|
||||
font-weight: 600 !important;
|
||||
font-size: 28px !important;
|
||||
line-height: 36px !important;
|
||||
letter-spacing: -0.02em !important;
|
||||
color: #3D3C40 !important;
|
||||
}
|
||||
|
||||
.subTitle div {
|
||||
font-size: 16px !important;
|
||||
line-height: 24px !important;
|
||||
color: rgba(61, 60, 64, 0.64) !important;
|
||||
}
|
||||
|
||||
.button a {
|
||||
background-color: #166DE0 !important;
|
||||
font-weight: 600 !important;
|
||||
font-size: 16px !important;
|
||||
line-height: 18px !important;
|
||||
color: #FFFFFF !important;
|
||||
padding: 15px 24px !important;
|
||||
}
|
||||
|
||||
.info div {
|
||||
font-size: 14px !important;
|
||||
line-height: 20px !important;
|
||||
color: #3D3C40 !important;
|
||||
padding: 40px 0px !important;
|
||||
}
|
||||
|
||||
.footerTitle div {
|
||||
font-weight: 600 !important;
|
||||
font-size: 16px !important;
|
||||
line-height: 24px !important;
|
||||
color: #3D3C40 !important;
|
||||
padding: 0px 0px 4px 0px !important;
|
||||
}
|
||||
|
||||
.footerInfo div {
|
||||
font-size: 14px !important;
|
||||
line-height: 20px !important;
|
||||
color: #3D3C40 !important;
|
||||
padding: 0px 48px 0px 48px !important;
|
||||
}
|
||||
|
||||
.footerInfo a {
|
||||
color: #166DE0 !important;
|
||||
}
|
||||
|
||||
.appDownloadButton a {
|
||||
background-color: #FFFFFF !important;
|
||||
border: 1px solid #166DE0 !important;
|
||||
box-sizing: border-box !important;
|
||||
color: #166DE0 !important;
|
||||
padding: 13px 20px !important;
|
||||
font-weight: 600 !important;
|
||||
font-size: 14px !important;
|
||||
line-height: 14px !important;
|
||||
}
|
||||
|
||||
.emailFooter div {
|
||||
font-size: 12px !important;
|
||||
line-height: 16px !important;
|
||||
color: rgba(61, 60, 64, 0.56) !important;
|
||||
padding: 8px 24px 8px 24px !important;
|
||||
}
|
||||
|
||||
.postCard {
|
||||
padding: 0px 24px 40px 24px !important;
|
||||
}
|
||||
|
||||
.messageCard {
|
||||
background: #FFFFFF !important;
|
||||
border: 1px solid rgba(61, 60, 64, 0.08) !important;
|
||||
box-sizing: border-box !important;
|
||||
box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.12) !important;
|
||||
border-radius: 4px !important;
|
||||
padding: 32px !important;
|
||||
}
|
||||
|
||||
.messageAvatar img {
|
||||
width: 32px !important;
|
||||
height: 32px !important;
|
||||
padding: 0px !important;
|
||||
border-radius: 32px !important;
|
||||
}
|
||||
|
||||
.messageAvatarCol {
|
||||
width: 32px !important;
|
||||
}
|
||||
|
||||
.senderName div {
|
||||
text-align: left !important;
|
||||
font-weight: 600 !important;
|
||||
font-size: 14px !important;
|
||||
line-height: 20px !important;
|
||||
color: #3D3C40 !important;
|
||||
padding: 0px 0px 4px 0px !important;
|
||||
}
|
||||
|
||||
.senderMessage div {
|
||||
text-align: left !important;
|
||||
font-size: 14px !important;
|
||||
line-height: 20px !important;
|
||||
color: #3D3C40 !important;
|
||||
padding: 0px !important;
|
||||
}
|
||||
|
||||
.senderInfoCol {
|
||||
width: 394px !important;
|
||||
padding: 0px 0px 0px 12px !important;
|
||||
}
|
||||
|
||||
@media all and (min-width: 541px) {
|
||||
.emailBody {
|
||||
padding: 32px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (max-width: 540px) and (min-width: 401px) {
|
||||
.emailBody {
|
||||
padding: 16px !important;
|
||||
}
|
||||
|
||||
.messageCard {
|
||||
padding: 16px !important;
|
||||
}
|
||||
|
||||
.senderInfoCol {
|
||||
width: 80% !important;
|
||||
padding: 0px 0px 0px 12px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@media all and (max-width: 400px) {
|
||||
.emailBody {
|
||||
padding: 0px !important;
|
||||
}
|
||||
|
||||
.footerInfo div {
|
||||
padding: 0px !important;
|
||||
}
|
||||
|
||||
.messageCard {
|
||||
padding: 16px !important;
|
||||
}
|
||||
|
||||
.postCard {
|
||||
padding: 0px 0px 40px 0px !important;
|
||||
}
|
||||
|
||||
.senderInfoCol {
|
||||
width: 80% !important;
|
||||
padding: 0px 0px 0px 12px !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body style="word-spacing:normal;">
|
||||
<div class="emailBody" style="">
|
||||
<!--[if mso | IE]><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:600px;" width="600" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
|
||||
<div style="background:#FFFFFF;background-color:#FFFFFF;margin:0px auto;border-radius:0;max-width:600px;">
|
||||
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="background:#FFFFFF;background-color:#FFFFFF;width:100%;border-radius:0;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="direction:ltr;font-size:0px;padding:24px;text-align:center;">
|
||||
<!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" width="600px" ><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:552px;" width="552" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
|
||||
<div style="margin:0px auto;max-width:552px;">
|
||||
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="border-left:1px solid #E5E5E5;border-right:1px solid #E5E5E5;border-top:1px solid #E5E5E5;direction:ltr;font-size:0px;padding:24px;text-align:center;">
|
||||
<!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:502px;" ><![endif]-->
|
||||
<div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
|
||||
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td align="left" style="font-size:0px;padding:0px;word-break:break-word;">
|
||||
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:collapse;border-spacing:0px;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width:132px;">
|
||||
<img alt="" height="21" src="{{.Props.SiteURL}}/static/images/logo_email_gray.png" style="border:0;display:block;outline:none;text-decoration:none;height:21.76px;width:100%;font-size:13px;" width="132" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!--[if mso | IE]></td></tr></table><![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!--[if mso | IE]></td></tr></table></td></tr><tr><td class="" width="600px" ><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:552px;" width="552" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
|
||||
<div style="margin:0px auto;max-width:552px;">
|
||||
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="border-left:1px solid #E5E5E5;border-right:1px solid #E5E5E5;direction:ltr;font-size:0px;padding:0 60px;text-align:center;">
|
||||
<!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:430px;" ><![endif]-->
|
||||
<div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
|
||||
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td align="left" class="title" style="font-size:0px;padding:10px 0px;word-break:break-word;">
|
||||
<div style="font-family:Arial;font-size:13px;line-height:1;text-align:left;color:#000000;">{{.Props.Title}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" style="font-size:0px;padding:10px 0px;padding-bottom:24px;word-break:break-word;">
|
||||
<div style="font-family:Arial;font-size:16px;line-height:24px;text-align:left;color:#000000;">{{.Props.SubTitle}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" vertical-align="middle" class="button" style="font-size:0px;padding:0px;word-break:break-word;">
|
||||
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:separate;line-height:100%;">
|
||||
<tr>
|
||||
<td align="center" bgcolor="#FFFFFF" role="presentation" style="border:none;border-radius:4px;border-top:16px;cursor:auto;mso-padding-alt:10px 25px;background:#FFFFFF;" valign="middle">
|
||||
<a href="{{.Props.ButtonURL}}" style="display:inline-block;background:#FFFFFF;color:#ffffff;font-family:Arial;font-size:13px;font-weight:normal;line-height:120%;margin:0;text-decoration:none;text-transform:none;padding:10px 25px;mso-padding-alt:0px;border-radius:4px;" target="_blank">
|
||||
{{.Props.Button}}
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!--[if mso | IE]></td></tr></table><![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!--[if mso | IE]></td></tr></table></td></tr><tr><td class="" width="600px" ><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:552px;" width="552" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
|
||||
<div style="margin:0px auto;max-width:552px;">
|
||||
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="border-left:1px solid #E5E5E5;border-right:1px solid #E5E5E5;direction:ltr;font-size:0px;padding:40px;text-align:center;">
|
||||
<!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:470px;" ><![endif]-->
|
||||
<div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
|
||||
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="vertical-align:top;" width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td align="center" style="font-size:0px;padding:0px;word-break:break-word;">
|
||||
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-collapse:collapse;border-spacing:0px;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="width:320px;">
|
||||
<img alt="" height="auto" src="{{.Props.SiteURL}}/static/images/add_subscription.png" style="border:0;display:block;outline:none;text-decoration:none;height:auto;width:100%;font-size:13px;" width="320" />
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!--[if mso | IE]></td></tr></table><![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!--[if mso | IE]></td></tr></table></td></tr><tr><td class="" width="600px" ><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:552px;" width="552" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
|
||||
<div style="margin:0px auto;max-width:552px;">
|
||||
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="border-left:1px solid #E5E5E5;border-right:1px solid #E5E5E5;direction:ltr;font-size:0px;padding:24px 24px 24px 24px;text-align:center;">
|
||||
<!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:502px;" ><![endif]-->
|
||||
<div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
|
||||
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-top:1px solid #E5E5E5;vertical-align:top;" width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td align="left" class="footerTitle" style="font-size:0px;padding:24px 0px 0px 0px;word-break:break-word;">
|
||||
<div style="font-family:Arial;font-size:13px;line-height:1;text-align:left;color:#000000;">{{.Props.QuestionTitle}}</div>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td align="left" style="font-size:0px;padding:0px 0px ;word-break:break-word;">
|
||||
<div style="font-family:Arial;font-size:14px;line-height:20px;text-align:left;color:#3D3C40;">{{.Props.QuestionInfo}}
|
||||
<a href='mailto:{{.Props.SupportEmail}}'>
|
||||
{{.Props.SupportEmail}}
|
||||
</a>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!--[if mso | IE]></td></tr></table><![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!--[if mso | IE]></td></tr></table></td></tr><tr><td class="" width="600px" ><table align="center" border="0" cellpadding="0" cellspacing="0" class="" style="width:552px;" width="552" ><tr><td style="line-height:0px;font-size:0px;mso-line-height-rule:exactly;"><![endif]-->
|
||||
<div style="margin:0px auto;max-width:552px;">
|
||||
<table align="center" border="0" cellpadding="0" cellspacing="0" role="presentation" style="width:100%;">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td style="border-bottom:1px solid #E5E5E5;border-left:1px solid #E5E5E5;border-right:1px solid #E5E5E5;direction:ltr;font-size:0px;padding:0px 24px 24px 24px;text-align:center;">
|
||||
<!--[if mso | IE]><table role="presentation" border="0" cellpadding="0" cellspacing="0"><tr><td class="" style="vertical-align:top;width:502px;" ><![endif]-->
|
||||
<div class="mj-column-per-100 mj-outlook-group-fix" style="font-size:0px;text-align:left;direction:ltr;display:inline-block;vertical-align:top;width:100%;">
|
||||
<table border="0" cellpadding="0" cellspacing="0" role="presentation" style="border-top:1px solid #E5E5E5;vertical-align:top;" width="100%">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td align="center" class="emailFooter" style="font-size:0px;padding:0px;word-break:break-word;">
|
||||
<div style="font-family:Arial;font-size:13px;line-height:1;text-align:center;color:#000000;">{{.Props.Organization}}
|
||||
{{.Props.FooterV2}}
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!--[if mso | IE]></td></tr></table><![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!--[if mso | IE]></td></tr></table></td></tr></table><![endif]-->
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<!--[if mso | IE]></td></tr></table><![endif]-->
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
{{end}}
|
||||
61
templates/cloud_trial_ended_email.mjml
Normal file
61
templates/cloud_trial_ended_email.mjml
Normal file
@@ -0,0 +1,61 @@
|
||||
<mjml>
|
||||
<mj-head>
|
||||
<mj-include path="./partials/style.mjml" />
|
||||
</mj-head>
|
||||
<mj-body css-class="emailBody">
|
||||
|
||||
<mj-wrapper mj-class="email" border-radius="0">
|
||||
|
||||
<mj-section padding="24px" border-top="1px solid #E5E5E5" border-left="1px solid #E5E5E5" border-right="1px solid #E5E5E5">
|
||||
<mj-column>
|
||||
<mj-image mj-class="logo" align="left" src="{{.Props.SiteURL}}/static/images/logo_email_gray.png" />
|
||||
</mj-column>
|
||||
</mj-section>
|
||||
|
||||
<mj-section padding="0 60px" border-left="1px solid #E5E5E5" border-right="1px solid #E5E5E5">
|
||||
<mj-column>
|
||||
<mj-text css-class="title" align="left" font-family="Arial" padding="10px 0px">
|
||||
{{.Props.Title}}
|
||||
</mj-text>
|
||||
<mj-text padding="10px 0px" padding-bottom="24px" font-size="16px" line-height="24px" align="left" color="#000000" font-family="Arial">
|
||||
{{.Props.SubTitle}}
|
||||
</mj-text>
|
||||
<mj-button href="{{.Props.ButtonURL}}" padding="0px" border-top="16px" css-class="button" align="left" font-family="Arial">
|
||||
{{.Props.Button}}
|
||||
</mj-button>
|
||||
</mj-column>
|
||||
</mj-section>
|
||||
|
||||
<mj-section padding="40px" border-left="1px solid #E5E5E5" border-right="1px solid #E5E5E5">
|
||||
<mj-column>
|
||||
<mj-image src="{{.Props.SiteURL}}/static/images/add_subscription.png" width="320px" padding="0px" />
|
||||
</mj-column>
|
||||
</mj-section>
|
||||
|
||||
<mj-section padding="24px 24px 24px 24px" border-left="1px solid #E5E5E5" border-right="1px solid #E5E5E5">
|
||||
<mj-column border-top="1px solid #E5E5E5">
|
||||
<mj-text css-class="footerTitle" padding="24px 0px 0px 0px" align="left" font-family="Arial">
|
||||
{{.Props.QuestionTitle}}
|
||||
</mj-text>
|
||||
<mj-text font-size="14px" line-height="20px" color="#3D3C40" padding="0px 0px " align="left" font-family="Arial">
|
||||
{{.Props.QuestionInfo}}
|
||||
<a href='mailto:{{.Props.SupportEmail}}'>
|
||||
{{.Props.SupportEmail}}
|
||||
</a>
|
||||
</mj-text>
|
||||
</mj-column>
|
||||
</mj-section>
|
||||
|
||||
<mj-section padding="0px 24px 24px 24px" border-left="1px solid #E5E5E5" border-right="1px solid #E5E5E5" border-bottom="1px solid #E5E5E5">
|
||||
<mj-column border-top="1px solid #E5E5E5">
|
||||
<mj-text css-class="emailFooter" padding="0px" font-family="Arial">
|
||||
{{.Props.Organization}}
|
||||
{{.Props.FooterV2}}
|
||||
</mj-text>
|
||||
</mj-column>
|
||||
</mj-section>
|
||||
|
||||
</mj-wrapper>
|
||||
|
||||
</mj-body>
|
||||
</mjml>
|
||||
Reference in New Issue
Block a user