Configure email service and template
INFO
For information about the GenAuth user pool version that supports the various benefits of the "Message Settings" function, please check the Official Website "Pricing" page. If your version does not support this benefit and you want to try it, you can activate the trial period. For an introduction to the trial period and how to activate it, please check Trial Period.
Email is an email sending service provided by GenAuth for users who register using "email". After entering any application, click the button as shown below to enter the email management panel:

Manage email templates
Six types of email templates can be configured in the email template, namely:
- Welcome email - This email will be sent if the user registers using an email address
- Reset password confirmation - This email will be sent every time the user successfully resets the password.
- Verification email - When the user registers with an email address, a verification email will be sent to the user to verify the email address. The user can complete the verification by clicking the link in the email address.
- Modify bound email - This email will be sent every time the user needs to modify the bound email address and send a verification code.
- Reset password - Every time the user forgets the password, the system will send this password reset email, and a verification code will be attached to the email. The user can reset the password after submitting the verification code and new password.
- Change password - Every time the user requests to change the password, this email will be sent, and a verification code will be attached to the email. The user needs to fill in this verification code to complete the password change.
As shown in the figure below:

Email macro command
Macros are used to generate some dynamic content, such as:
<div style="padding: 35px;">
<table
cellpadding="0"
align="center"
style="width: 600px; margin: 0px auto; text-align: left; position: relative; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 5px; border-bottom-left-radius: 5px; font-size: 14px; font-family:微软雅黑, 黑体; line-height: 1.5; box-shadow: rgb(153, 153, 153) 0px 0px 5px; border-collapse: collapse; background-position: initial initial; background-repeat: initial initial;background:#fff;"
>
<tbody>
<tr>
<th
valign="middle"
style="height: 25px; line-height: 25px; padding: 15px 35px; border-bottom-color: rgba(18, 24, 37, 0.87); background-color: #484f60; border-bottom-color: #C46200; background-color: #484f60; border-top-left-radius: 5px; border-top-right-radius: 5px; border-bottom-right-radius: 0px; border-bottom-left-radius: 0px;"
>
<font face="微软雅黑" size="5" style="color: rgb(255, 255, 255); "
>{{app_name}}
</font>
</th>
</tr>
<tr>
<td>
<div style="padding:25px 35px 40px; background-color:#fff;">
<h2 style="margin: 5px 0px; ">
<font color="#333333" style="line-height: 20px; "
><font style="line-height: 22px; " size="4"
>Hi,{{user_email}}</font
></font
>
</h2>
<p>Welcome to {{app_name}}</p>
<p>{{app_description}}</p>
<p align="right">{{app_name}} 团队</p>
<p align="right">{{TIME}}</p>
</div>
</td>
</tr>
</tbody>
</table>
</div>In this email, {{app_name}}, {{app_description}}, {{TIME}}, {{user_email}} are all macro commands. After parsing this email in GenAuth, the result will be similar to the following:

All currently supported macro commands are listed in the following table:
| Macro Command | Function |
|---|---|
| {{subject_name}} | Email Subject |
| {{client_name}} | Sender |
| {{app_name}} | GenAuth Application Name |
| {{app_description}} | GenAuth Application Description |
| {{app_logo}} | GenAuth Application LOGO |
| {{user_email}} | User Email |
| {{user_display_name}} | User Display Name |
| {{user_name}} | User name |
| {{username}} | User name |
| {{password}} | User login password |
| {{app_domain}} | Application login address |
| {{invite_link}} | Invite link address when inviting users |
| {{inviter_name}} | Inviter name when inviting users |
| {{verify_code}} | Verification code when sending email verification code |
| {{verify_link}} | Email verification address |
| {{expires_in}} | Email verification address validity period |
| {{password_effective_time}} | Password effective time |
| {{update_password_link}} | Password change link address |
| {{email_effective_time}} | Email effective time |
| {{login_url}} | New account login address |
| {{tenant_name}} | Tenant name |
| {{tenant_logo}} | Tenant LOGO |
| {{tenant_domain}} | Tenant domain name |
| {{host_url}} | Tenant management address |
| {{admin_name}} | Administrator name |
| {{userpool_name}} | User pool name |
| {{userpool_logo}} | User pool LOGO |
| {{ip}} | User login IP |
| {{country}} | User login country |
| {{province}} | User login province |
| {{city}} | User login city |
| {{datetime}} | User login time |
| {{userPoolName}} | User pool name |
| {{workflowName}} | Workflow name |
| {{errorTime}} | Workflow execution error time |
| {{taskName}} | Workflow task name |
| {{workflowExecuteLogUrl}} | Workflow execution log address |
| {{errorReason}} | Workflow execution failure reason |
| {{workflowInstanceId}} | Workflow execution ID |
| {{failedCount}} | Workflow execution failed error data count |
Configure third-party mail service
Our built-in mail sending server uses Alibaba Cloud Enterprise Mailbox. If you want to customize the mail server, you can set it on this page:
config-email-providerCode snippet: config-email-provider