Multiple Email providers
You can setup multiple SMTP servers in GpsGate Server for email notification and scheduled reports.
A server with many applications and event rules can generate a large number of email notifications. For best performance and to avoid being black-listed for spam, it is recommended that you setup multiple SMTP servers.
If a customer has their own SMTP server for email, make sure the customer’s application uses this SMTP server directly. It is easy to map SMTP server to one or many applications using Application Tags. Another option is to map a SMTP server to email recipients by their domain name, e.g. map all @gmail.com recipients to a specific SMTP server.
This guide gives you a walk through of how you can create, configure and sort email providers for your needs.
Creating new email providers
When you get to the email providers configuration page, all existing providers will be displayed in the list view under “Configure Providers” section.
To create a new provider:
- Select a provider type from the dropdown list.
- A form is displayed to let you input provider information. The fields you have to fill in varies depending on the provider type. Basically, you will have to fill in SMTP settings for SmtpPopEmailMessageProvider type, while it’s enough to fill in the name field for BlockEmailProvider type. The image below shows the form for defining a new smtp email provider:
- For each new provider you define, you can also specify one or more application tags the provider should be picked for. If you don’t specify any application tags, this provider will be available for all outgoing emails under any application.
- You can also limit the availability of the email provider to certain email domains (such as “gmail.com”, “yahoo.com” etc.) by specifying domain in “Email Address Patterns” field. This can also be a full email address for filtering. If you do not specify any email patterns here, this provider will be available for any email address.
- Now, click “Save” to create and activate the new provider. The new provider will be appended to the existing providers list.
- You can then change the order of providers, enable/disable (start/stop) them in the list view.
Block Email Provider
Block Email Provider is a new type of provider to block outgoing emails. If any outgoing email matches the criteria of a block provider in the list, that email is not sent.
How it works
For each outgoing email, the list of active (running) email providers is checked. The first provider that matches the criteria is picked as the service to be used for that particular email. This process is repeated for every outgoing email.
Considering the list above, assume that an event rule tries to send an email notification to email address “email@example.com”, and this email belongs to a device under an application with “East Asia” tag. In this case, Yahoo Provider will be picked for the email delivery.
Now, another event rule tries to send an email to address “firstname.lastname@example.org”, and this email is of a device under an application with “Australia” tag. Outlook Provider matches the critearia, but it will be ignored since it’s disabled (i.e. not running). Instead, this email will match Block Emails, which basically is valid for all conditions, and the email will be blocked.
Again, any email address that belongs to a device under an application with “South America” tag will be blocked, since it will not match any specific provider in the list ad will fall back to Block Provider.
What happens to my existing email providers?
After upgrading to the latest Patch.v4, your existing smtp pop email message providers will be moved from “Service → Providers” to “Settings → Email” menu. Please check the new list to make sure all providers are well defined and are in the order you want.
Please note that a Smtp Pop Email Message Provider is installed by default during GpsGate Server setup. If you have no SMTP settings configured, this default provider will be deleted. If SMTP settings were completed prior to the update, then this provider will inherit old settings in its new version.
You can always preview which provider is selected for a particular number by clicking “Preview Matching Provider” button under “Test settings” section. You can also try to send a test email by clicking “Send Test Email” button.