Flussonic Watcher documentation

Contents

Email customization

Setting the SMTP server

Configure your mailbox settings so that password recovery emails could reach your users. Add parameters of the outgoing mail server to the configuration file.

For example, use these parameters:

Email: email.address@example.com;
Password: xyz123;
Mail server address: smtp.example.com;
Port: 465;
Connection security: SSL

Add these parameters to the configuration file:

vsaas {
  database postgresql://vsaas:PASSWORD@localhost/vsaas_production;
  smtp_server smtp.example.com:465;
  smtp_login email.address:xyz123;
  email_from "Flussonic Watcher <email.address@example.com>";
  smtp_opts ssl;
}

Changing the template of password recovery emails

To change the template for password recovery emails, follow these steps:

  • Go to /opt/flussonic/lib/vsaas/watcher/templates.
  • Use password_reset_request.email and password_changed.email text files as an examples.
  • Add custom_ file prefix to your custom template versions: custom_password_reset_request.email and custom_password_changed.email.
  • If you want to use custom hypertext templates, add the .html extension to these files as follows: custom_password_reset_request.email.html and custom_password_changed.email.html. Save these files in the same directory.

The template consists of two parts: the header and the body. You can also add a subject to the header.

In addition, in the message body you can use variables

  • {{data.base_url}}
  • {{data.token}}

Text template example:

custom_password_reset_request.email:
---
subject: "ABC surveillance password reset"
---

Thank you for using the forgot password option. Follow this link to reset your password to the ABC surveillance system:
{{data.base_url}}/vsaas/forgot-password/{{data.token}}

HTML template example:

custom_password_reset_request.email.html:
---
subject: "ABC surveillance password reset"
---
<html>
<body>
<p>Thank you for using the forgot password option.to the ABC surveillance system:<br>
<a href="{{data.base_url}}/vsaas/forgot-password/{{data.token}}">Reset your password</a>
</p>
</body>
</html>