# Mail

Mail is a mail sending service provided by Authing for users who register with "Mailbox"

Mail is the mail sending service provided by Authing for users registered with "Mailbox". After entering any application, click the button as shown below to enter the mail management panel:

# Manage email templates

There are four types of email templates that can be configured in the email template:

  1. Welcome email-This email will be sent if the user registers with the mailbox;
  2. Verification Email-If the user registers with an email address, a verification email will be sent to the user to verify the email, and the user can click the link in the email to complete the verification;
  3. Modify Password-This email will be sent whenever the user requests to change the password, with a verification code attached to the email, and the user needs to fill in this verification code to complete the password modification;
  4. Reset Password-When the user forgets the password, the system will send this password reset email, with a verification code attached to the email, and the user can reset the password after submitting the verification code and new password.

As shown below:

# Mail Macro Command

Macro commands 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: Microsoft Yahei, boldface; 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;">
				<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="Microsoft Yahei" size="5" style="color: rgb(255, 255, 255); ">{{client_name}} </font>
					<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">You OK, {{user_email}}</font></font></h2>
						<p>Welcome to join {{client_name}}</p>
						<p align="right">{{client_name}} Team</p>
						<p align="right">{{time}}</p>

, , , in this email are all macro commands. This email is in Authing After parsing, the result will be similar to the following:

All currently supported macro commands are shown in the following table:

Macro Command Function
{$frontmatter.client_name} Authing application name created
{$frontmatter.time} Current time
{$frontmatter.user_email} Email of current registered user
{$frontmatter.client_description} Authing application description created
{$frontmatter.verify_link} Verify the verification link in the email (generated by Authing)
{$frontmatter.verify_code} The verification code sent before resetting the password

# Configure third-party mail services

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 (currently supports Alibaba Enterprise Mailbox, Tencent Enterprise Mailbox and custom SMTP service).