Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 7 Next »

Introduction:

This page is to show different variables with information of each variable that is needed to configure mail notification content.

NameTypeDescriptionExample

transport

Object

To configure the connection with 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

Examples

Example #1

You can browse to SMTP transport module for Nodemailer documentation to make sure you use the right configuration.

SMTP transport Example
"from": "soajs@your.cloud.io",
  "transport": {
    "type": "smtp",
    "options": {
      "host": "smtp.mailgun.org",
      "port": 465,
      "auth": {
         "user": "soajs@your.cloud.io",
         "pass": "xxxxxx"
      }
    }
  }

Example #2

Custom Content of mail.

Mail Content
"<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>"

Variables used:

  1. User variables used here like username and firstName can be found under the User Model
  2. limit: expiry of the link in hours.
  3. 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. 

Link Example
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'
},
  • No labels

0 Comments

You are not logged in. Any changes you make will be marked as anonymous. You may want to Log In if you already have an account.