envelope-dotEmail Service

Starting v4.2.0, you'll be able to share your peers with email. To enable it, simply head to Settings > WGDashboard Settings.

circle-exclamation
1

Configure Email Account

Scroll down to the Email Account section.

2

Fill in the following fields

Field
Example

Server

smtp.qq.com

Port

567

Encryption

Username

example@qq.com or username from your mail service provider

Password

Send From

Email address you want to send from: example@qq.com. Or if you want a name with it: Donald Zou <example@qq.com>

3

Ready indicator

Once everything is filled, you should see a green Ready top right of the form.

4

Test email

Try to send a test email and see if everything works.

5

Edit Email Body Template

If the test email works, you can start editing the Email Body Template. Please read the following for details.

Email Body Template

The template uses the Jinja template engine to generate an HTML body for your email. In your template, there are two variables you can use:

  • peer

    Example:

{
   "DNS": "",
   "ShareLink": [],
   "allowed_ip": "10.0.0.3/32, 2001:db8:64:49::3/128",
   "configuration": {
      "Address": "10.0.0.1/28, 2001:db8:64:49::1/64",
      "ConnectedPeers": 0,
      "DataUsage": {
         "Receive": 0,
         "Sent": 0,
         "Total": 0
      },
      "ListenPort": "51823",
      "Name": "wg-external",
      "PostDown": "",
      "PostUp": "",
      "PreDown": "",
      "PreUp": "",
      "PrivateKey": "aC98hORPAbbxXZmy8qy1JP9Ip3JtEhbjDTOGtgHvmmg=",
      "Protocol": "wg",
      "PublicKey": "upH8PMbMzpcynJXz09Vldye09vzAmmNRV40hR+Vhbyw=",
      "SaveConfig": true,
      "Status": true,
      "TotalPeers": 13
   },
   "cumu_data": 0,
   "cumu_receive": 0,
   "cumu_sent": 0,
   "endpoint": "(none)",
   "endpoint_allowed_ip": "0.0.0.0/0",
   "id": "Wu/0xCr+n/caqDVKtjG+C9UelAvY/beARX3cW1i7LUI=",
   "jobs": [],
   "keepalive": 21,
   "latest_handshake": "No Handshake",
   "mtu": 1420,
   "name": "",
   "preshared_key": "",
   "private_key": "ABgsivKkBd6K9LizqHm/pDjfq2HRNESjdJBIz4RMlkE=",
   "remote_endpoint": "wg.local",
   "status": "stopped",
   "total_data": 0,
   "total_receive": 0,
   "total_sent": 0
}
  • configurationFile

    Example:

Example template and result

Template:

Rendered result:

Please be aware that the template may reveal sensitive information like your configuration. Check the content carefully before sending.

Last updated