Back

Email Templates

  • 2
  • Self Hosted
  • Users
TernaryBash
11 Feb, 2023, 20:52

Hello, so I have configured my instance with my SMTP provider but I am overall confused on where and how to edit my templates. Shouldn't that be something resolved in the AppWrite console? Thank you.

TL;DR
User suggests adding a new property 'action' to the email templates and modifying the template code to use this property for the action button. To make the suggestion, create a GitHub issue with the proposed changes. A user asks for information on where to change the response text for the Account create email. Currently, this can be done by replacing the template files located at https://github.com/appwrite/appwrite/tree/master/app/config/locale/templates. The Appwrite console does not currently have a feature to edit templates, but it is planned for the future. A user asks for guidance on editing templates after configuring SMTP provider.
Eldad
11 Feb, 2023, 20:55

Right now this is not available through the Appwrite console, but you could replace the templates files located at: https://github.com/appwrite/appwrite/tree/master/app/config/locale/templates

We do plan to add this as a console feature in the future.

TernaryBash
11 Feb, 2023, 22:04

Any information you can pass on regarding where the templates values are coming from? I want to change the Account's create email response text.

TernaryBash
12 Feb, 2023, 16:52

Yup, thank you.

THE-E
29 Mar, 2023, 19:22

Hey there, I would like to make a suggestion regarding the template:

currently the action link inside the mails (e.g. account verification) is a clear link (<a href="{{redirect}}" target="_blank">{{redirect}}</a>). But I think it makes more sense to add a property action to the emails e.g.:

TypeScript
{
...
    "emails.verification.subject": "Account Verification",
    "emails.verification.hello": "Hey {{name}}",
    "emails.verification.body": "Follow this link to verify your email address.",
    "emails.verification.footer": "If you didn’t ask to verify this address, you can ignore this message.",
    "emails.verification.thanks": "Thanks",
    "emails.verification.signature": "{{project}} team",
    "emails.verification.action": "Verify Account",
...
}

And modify the template to:

TypeScript
<!doctype html>
<html>

<head>
  <style>
    .button {
      border: none;
      color: white;
      padding: 15px 32px;
      text-align: center;
      text-decoration: none;
      display: inline-block;
      font-size: 16px;
      margin: 4px 2px;
      cursor: pointer;
      background-color: #4CAF50;/* e.g. Green */
    }
  </style>
</head>

<body style="direction: {{direction}}">
  ...
  <a href="{{redirect}}" target="_blank"><button class="button">{{action}}</button></a>
</body>
</html>

What do you think?

Drake
29 Mar, 2023, 19:29

it would be best to create a github issue with your suggestion

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more