-
Notifications
You must be signed in to change notification settings - Fork 116
Update SMTP template docs #368
Conversation
<tbody> | ||
<tr> | ||
<td>Sender name</td> | ||
<td>[TODO: @damodar where is this used?].</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
used as From
name while sending the email
https://github.com/appwrite/appwrite/blob/6700f90ba150a5065088cbd15d1164a1cd3e15a2/app/workers/mails.php#L59
</tr> | ||
<tr> | ||
<td>Sender email</td> | ||
<td>[TODO: @damodar which part of this can be configured? Does it have to do with the SMTP configuration?].</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whole email is configurable, but they should be careful, as the SMTP config should allow this email as the sender email. And whole custom email templates can only be changed when custom SMTP configuration is setup
</tr> | ||
<tr> | ||
<td>Reply to</td> | ||
<td>[TODO: @damodar Where is this displayed, if empty is no reply?].</td> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Used as email's reply to address. If empty it's not used.
</tbody> | ||
</table> | ||
<h3><a href="#email-template-syntax" id="email-template-syntax">Email Template Syntax</a></h3> | ||
<p>[TODO: @damodar are these variables accessible only in the Message tempalte or also the other components?]</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not decided yet, for now let's say only Message
<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> [TODO: @damodar is this used for localization? Can you configure a different template for each language?].</li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's the idea, each language will have different SMSs and Emails templates
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Replied to all the comments.
@lohanidamodar Please review again, anything missing from this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, but I think the SMS template section is missing ?
Ooooo We're also doing SMS this release? |
OBSOLETE COMMENT |
I think we should also change the title to match the navigation link. This page will also create confusion with the existing SMS delivery page. I suggest we add a comment on both pages, warning readers in case they're looking for the other page. |
<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> | ||
|
||
<h2><a href="#customize" id="customize">Customize Templates</a></h2> | ||
<p>You can customize email templates in the Appwrite console.</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<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> |
@@ -0,0 +1,128 @@ | |||
<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> |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
I think we could also benefit from a console screenshot here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
left comments
@@ -0,0 +1,145 @@ | |||
<p>Appwrite uses email and SMS messages to communicate with users to perform authentication actions. Emails and SMS messages can be customized to fit your app's design and voice.</p> | |||
|
|||
<p>Each Appwrite project can have its own set of unique templates. Templates also support localization, every template can be written in multiple languages and served depending on the [TODO: @dlohani]</p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not sure how this should go yet, for now we could just keep up to. We don't yet have method to set locale in projects?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not aware of it...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is client.setLocale
method that set's the locale header X-Appwrite-Locale
, which then determines which local to use.
</table> | ||
|
||
<h3><a href="#email-template-examples" id="email-template-components">Email Template Components</a></h3> | ||
[TODO: @dlohani once we're ready, let's do examples for each type of template (maybe also what it would look like rendered)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean by Email Template components?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If its' console UI, then Arman already has it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you mean by Email Template components?
Sorry, I mean email template Examples
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it should be ready, you can check with @ArmanNik
|
||
<h2>Localization</h2> | ||
[TODO: @dlohani short description of how it's decided which language's template is sent] | ||
[TODO: @dlohani Maybe example of a template in two languages? (maybe also what it would look like rendered)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you mean by this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So we would just describe how users would set their templates, then show the same message for an email template in two languages + screenshots.
This just fully demonstrates how localization works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
by using client.setLocale
to set the locale header.
</html></code></pre> | ||
</div> | ||
|
||
<h2><a href="#sms-templates" id="sms-templates">SMS Templates</a></h2> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should not mention SMS templates. This section should be gone, and in introduction we shouldn't talk about it.
We disabled this feature for now. We will add it back when we add support for custom SMS provider.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than the suggestions I provided, this LGTM. Only accept those that make sense to you as well.
Co-authored-by: Matej Bačo <matejbaco2000@gmail.com>
Co-authored-by: Matej Bačo <matejbaco2000@gmail.com>
Co-authored-by: Matej Bačo <matejbaco2000@gmail.com>
What does this PR do?
(Provide a description of what this PR does.)
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)
Related PRs and Issues
(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)
Have you read the Contributing Guidelines on issues?
(Write your answer here.)