...
Name | Type | Description | Example |
---|---|---|---|
transport | Object | To configure the connection with mail email provider | Example #1 |
subject | string | Mail Subject | "Mail Subject number 1" |
from | string | from email | "mail@soajs.org" |
path | string | Template Path | "/soajs/node_modules/soajs.urac/mail/urac/changeUserStatus.tmpl" |
content | string | You either use custom mail content or you use mail template path | Example 2 |
...
Code Block | ||||
---|---|---|---|---|
| ||||
"from": "soajs@your.cloud.io", "transport": { "type": "smtp"smtp”, "options": { "servicehost": "smtp.mailgun.org", "gmail" "port": 465, "auth": { "user": "soajsiosaas@gmailsoajs@your.cloud.comio", "pass": "xxxxxxxxxxx" } } } |
Example #2
Custom Content of mail.
Code Block | ||||
---|---|---|---|---|
| ||||
"<p>Dear <b>{{username}}</b>, <br />You have requested to reset your password. <br />Please click the following link to proceed: <a href='{{link.forgotPassword}}'>{{link.forgotPassword}}</a>. <br />Please note that the above link will expire in {{limit}} hours.<br /><br />Regards,<br/>SOAJS Team.</p>" |
The Variables used:
- User variables used here like username and firstName can be found under the User Model
...
- .
- limit: expiry of the link in hours.
- Links: Check the section below with an example about links.
Links
This section will list the links in mail Configuration based on the mail subject.
Code Block | ||||
---|---|---|---|---|
| ||||
link: {
addUser: 'http://dashboard.soajs.org:80/#/setNewPassword',
changeEmail: 'http://dashboard.soajs.org:80/#/changeEmail/validate',
forgotPassword: 'http://dashboard.soajs.org:80/#/resetPassword',
join: 'http://dashboard.soajs.org:80/#/join/validate'
}, |