Technical documentation - Bulletins by email

Bulletins by email functions enables users to receive mail with the list of latest published bulletins at selected interval.

Version 5 and later.

Profile.config settings

Profile setting to enable this function to let the users select and activate to receive mail with the list of latest published bulletins.

<BulletinMailSettings> <EnableTrace>false</EnableTrace> <!-- UserName and Password settings moved to API authentication starting from version 5.0.4 --> <UserName>test</UserName> <Password>test</Password> <MailReportReciever>xyz@zys.com</MailReportReciever> <MailFrequencySettings> <MailFrequencySetting value ="1" label ="Daily"/> <MailFrequencySetting value = "7" label = "Weekly" /> </MailFrequencySettings> </BulletinMailSettings>

From version 5.0.4, username and password is stored in api.permission.config file for authentication.

“api.permission.config” file need to have username , password and role for BulletinMail function.

Role is “BulletinMail”.

<ApiPermission> <Enabled>true</Enabled> <AllowAnonymous>false</AllowAnonymous> <Username>test</Username> <Password>test</Password> <Roles>BulletinMail</Roles> </ApiPermission>

User can go to my account and select to activate the function and select the interval at which they would like to receive the mail.

Configure task in windows task scheduler

To automatically send the mails at selected interval , windows scheduled tasks need to be configured. Go to windows search and type “task scheduler” and select the select “Task scheduler” application.

Task Scheduler application will open. Click on “Action” menu and select “Create Task”.

In “General” tab, fill the Name of the of the task and select “Run whether user is logged on or not”.

Select the option “Run with highest privileges”.

In triggers tab, select the start date and time and interval (daily, one time, weekly or monthly) and click “OK”.

In action tab, select the powershell.exe and provide the arguments value.

Browse to powershell.exe in Program/script

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe

Provide arguments (marked in red should be as per your setting)

-version 5.1 -NoProfile -NoLogo -NonInteractive -WindowStyle Normal -ExecutionPolicy Bypass -File "C:\ProgramData\Signifikant\Assert\BulletinMail.ps1" -Id "BulletinMail_1" -Server "http://localhost/AssertWeb"  -Site "sitename" -Frequency "7"  -LogPath "C:\Temp\Log" -UserName "test" -Password "test" -Language "en-GB"

Username and Password should be the same as in profile.config under BulletinsMailSettings.

Make sure the language exist on the selected site.

Click OK after filling all details. Fill your machine password.

And once the task is saved then you can notice the task in list.

 To test if the command is correct or not , Ms-Dos command prompt can be used with below example ( changing the argument values as per actual values.)

C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -version 5.1 -NoProfile -NoLogo -NonInteractive -WindowStyle Normal -ExecutionPolicy Bypass -File "C:\ProgramData\Signifikant\Assert\BulletinMail.ps1" -Id "BulletinMail_1" -Server "http://localhost/AssertWeb" -Site "sitename" -Frequency "7" -LogPath "C:\Temp\Log" -UserName "test" -Password "test" -Language "en-GB"

 

Note: When windows task scheduler is hosted on the server and web application is accessed by “https” then “server” parameter value should be full domain name.

Example : https://www.abc.com/AssertWeb