by adrien » Apr 14 16 10:39 am
Hi
basically policies are event handlers. There are various things in WinGate that push events, and if you have something attached/connected/hooked to that event, then that thing will be "performed", so if you hook any of the event handlers (double click on an event in the list in Control Panel > Events and you will see a list of processors available for an event) then it will be done.
So Policy is just one of these, but it means if you don't hook a policy to an event, it's not going to do anything.
If you look in the policy that's hooked to your notification events, you'll see an item in there which tries to send an email. It takes a to address, and by default this comes from
{{Data.GetString("AdminEmail")}}
{{ ... some expression ... }}
means take the expression, evaluate it, do whatever it means, and then convert the output to a string (text).
So, this one takes the Data object, gets the string value called "AdminEmail", and uses that in the to address.
What that error is telling you is that after doing this, it had no email address. That's because there's no email address specified in the "adminEmail" string value in global data. Go to Control Panel > Data, and choose (at the bottom) the "Global Data" panel, and you should see it there. Our installer sets this to the value entered when you installed, but if you didn't enter an email address, then there's the problem.
The string may not be empty. The To and From addresses in the "Send Email" item can take name/email combinations. This is so the email can show a name as well as an email address, and the format internally is e..g
WInGate Support <support@wingate.com>
So if there's no email embedded (in angle brackets) in that string value, that explains the error "No email address survived parsing" - this means there may have been something, but after we tried to scrape an email out, we didn't get one. The significance of this can be subtle, but in some cases you may be getting these values from anywhere, and you may have expected there to be an email iln there, so we prefer to be precise in our error string rather.
There's quite a lot of information also in the help file on policy. If you open a policy and hit F1 key you should see this.
Regards
Adrien de Croy