I added test send to it for when a value changes; it just sent for first time with this added inwho knows how long?
// detect when an option of this program is changed and store the new value to system settings
When.ModuleParameterChanged((module, parameter)=>{
if (module.Instance.Equals(Program.Module) && parameter.Name.StartsWith("ConfigureOptions.")) {
var settingName = parameter.Name.Substring(17); // skip "ConfigureOptions." part
Settings.Parameter("Messaging."+settingName).Value = parameter.Value;
var subject = "test email";
var messagetext = "HG Test Email";
var recipients = "mike@xxxere.com";
Net.SendMessage( recipients, subject, messagetext );
if (Net.SendMessage(recipients, subject, messagetext) == true)
Program.Notify("E-Mail Notification", "SUCCESS! Notification sent.");
else Program.Notify("E-Mail Notification", "ERROR: Notification **NOT** sent.");
}
return true;
});
Program.GoBackground();