Skip to content
This repository was archived by the owner on Sep 29, 2023. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
01585c2
Init SMTP template docs
gewenyu99 Mar 28, 2023
d61ac64
Use relative links
May 5, 2023
0c444f7
Add placeholders for docs
May 8, 2023
703d2c3
Update email template docs with Damodar's comments
May 18, 2023
5b880ec
Add SMS into the templates page
May 24, 2023
455b4bf
Fix table heading for variables
May 25, 2023
2319af0
Added more to template docs
Jun 5, 2023
4a01a38
Update app/views/docs/email-and-sms-templates.phtml
Jun 6, 2023
601dd29
Update app/views/docs/email-and-sms-templates.phtml
Jun 6, 2023
6158cf8
Update event object's attribute key names
Jun 7, 2023
ee683aa
attribute model page
Jun 9, 2023
b0d10a9
Fix file format for attribute model
Jun 9, 2023
3562309
Update copy
Jun 9, 2023
dbe2e9f
Fix Damodar's comments
Aug 1, 2023
a43a6d6
Fix the repo url for apple sdk in getting started for apple
stnguyen90 Aug 16, 2023
d2218e3
Merge pull request #419 from appwrite/fix-getting-started-for-apple
abnegate Aug 16, 2023
ae50426
Merge pull request #384 from appwrite/model-attribute-generic
eldadfux Aug 22, 2023
74a503f
Merge pull request #382 from appwrite/fix-events
eldadfux Aug 22, 2023
99c3600
Add locale examples
Aug 23, 2023
82fe484
chat GPT helps me spell!
Aug 23, 2023
456617e
Merge branch 'main' into smtp-templates
Aug 23, 2023
b5dd068
Update app/views/docs/email-and-sms-templates.phtml
Aug 25, 2023
e6b6fee
Update app/views/docs/email-and-sms-templates.phtml
Aug 25, 2023
9249017
Apply suggestions from code review
Aug 25, 2023
5353edf
Console capitalized
Aug 25, 2023
7844c58
remove reference of phone/sms template
Aug 25, 2023
24ebe2f
Fix index
Aug 25, 2023
4dd15d6
Merge branch '1.4.x' into smtp-templates
Meldiron Aug 28, 2023
034de4a
Add SMTP steps
Aug 29, 2023
bc3f286
Merge branch 'smtp-templates' of https://github.com/appwrite/docs int…
Aug 29, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
76 changes: 76 additions & 0 deletions app/views/docs/email-and-sms-templates.phtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
<p>Appwrite uses emails messages to perform user invite, user verification, login, and reset password. Emails messages can be customized to fit your app's design and voice.</p>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The page is mostly focused on emails, while we also support SMS templates and maybe other in the future, we need to make the docs more balanced. I would also mention you can customize them per project and for multiple languages at the top of the page linking to more information on how to manage localization in Appwrite.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I might even add a table of content for quick links to emails vs sms.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Localization might be worth its own section with a code example.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

😆 Some of these sections are new, for a while I thought SMS delivery wasn't going to be added yet.


<h2><a href="#customize" id="customize">Customize Templates</a></h2>
<p>You can customize email templates in the Appwrite console.</p>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<p>You can customize email templates in the Appwrite console.</p>
<p>You can customize email templates for each of your projects in the Appwrite console. </p>

<div class="notice">
<h2>Custom SMTP Server Required</h2>
<p>The built-in email service does not support custom email templates. Configure a <a href="#smtp">custom SMTP server</a> to enable custom email templates.</p>
Comment thread
gewenyu99 marked this conversation as resolved.
Outdated
</div>
<ol class="margin-top margin-bottom-large text-size-normal">
<li>In your project, navigate to the <b>Auth</b> service.</li>
<li>Under the <b>Auth</b> service, navigate to the <b>Templates</b> tab.</li>
<li>Expand the email template you want to edit.</li>
<li>Select the <b>Template language</b>. You can have a different template for each language your app supports.</li>
<li>Update the email template fields and click **Update** to save your changes.</li>
</ol>
<h2><a href="#email-templates" id="email-templates">Email Templates</a></h2>
<p>You can customize the email emplates for account verification, magic-url authentication, password resets, and user invites.</p>
<h3><a href="#email-template-components" id="email-template-components">Email Template Components</a></h3>
<p>Each email templates has the following components that you can customize.</p>
<h2 id="permission-types"><a href="/docs/permissions#permission-types">Permission Types</a></h2>
<p>In Client and Server SDKs, you will find a <b>Permission</b> class with helper methods for each role described below.</p>
<table class="full text-size-small">
<thead>
<tr>
<td style="width: 200px">Component</td>
<td>Description</td>
</tr>
</thead>
<tbody>
<tr>
<td>Sender name</td>
<td>Readers will see this as display name of the sender.</td>
Comment thread
gewenyu99 marked this conversation as resolved.
Outdated
</tr>
<tr>
<td>Sender email</td>
<td>Readers will see this as the displayed email of the sender. This must be a valid email for the SMTP provider your configured.</td>
</tr>
<tr>
<td>Reply to</td>
<td>Readers will reply to this email adress instead of the sender address. You can leave this field empty if unused.</td>
</tr>
<tr>
<td>Subject</td>
<td>The title of the email.</td>
</tr>
<tr>
<td>Message</td>
<td>The body of the email. You can find the variables available in the <a href="#email-template-syntax">Email Template Syntax</a> section.</td>
Comment thread
gewenyu99 marked this conversation as resolved.
Outdated
</tr>
</tbody>
</table>
<h3><a href="#email-template-syntax" id="email-template-syntax">Email Template Syntax</a></h3>
<p>Variables can be used in email templates to dynamically format unique emails for each reader. These variables can only be accessed in the <b>Message</b> field of the email template.</p>
Comment thread
gewenyu99 marked this conversation as resolved.
Outdated

<table class="full text-size-small">
<thead>
<tr>
<td style="width: 200px">Component</td>
<td>Description</td>
</tr>
</thead>
<tbody>
<tr>
<td><code>{{project}}</code></td>
<td>The project name.</td>
</tr>
<tr>
<td><code>{{team}}</code></td>
<td>Thee project team's name.</td>
</tr>
<tr>
<td><code>{{user}}</code></td>
<td>The name of the uer receiving the email.</td>
</tr>
</tbody>
</table>
1 change: 1 addition & 0 deletions app/views/docs/index.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ $cols = [
<li><a href="/docs/pagination">Pagination</a></li>
<li><a href="/docs/webhooks">Webhooks</a></li>
<li><a href="/docs/custom-domains">Custom Domains</a></li>
<li><a href="/docs/email-and-sms-templates">Email and SMS Templates</a></li>
<li><a href="/docs/response-codes">Response Codes</a></li>
<li><a href="/docs/rate-limits">Rate Limits</a></li>
</ul>
Expand Down