uri: /s01/products/psimalerts/psimalertfordevelopers
1. Select Start, All Programs, Microsoft Visual Studio 2010. Select Microsoft Visual Studio 2010![]()
![]()

2. From the File menu select New then Project.

3. Under Installed Templates expand C#. Select Windows. In the middle result list select
Console Application
4. In the name field enter psIMAlertLibTest
5. Select OK

6. Download
psIMAlertLib.dll
to
C:\Program Files\Blue Quality Studios\psIMAlert
7. In DevStudio from the Project menu select Add Reference
8. Select the Browse tab.
9. In the File Name field enter
C:\Program Files\Blue Quality Studios\psIMAlert\psIMAlertLib.DLL
Note: Select
psIMAlertLib.DLL
not psIMAlert.DLL

10. In the Add Reference dialog select OK. In Solution Explorer the psIMAlertLib will appear under References.

11. At the top of Program.cs before namespace add the line
using BQS.psIMALertLib;

12. In Program.cs replace the Main function with
static void Main(string[] args)
{
string strFrom = "sip:fred.natzke@bqs.com.au";
string strTo = "dave.smith@bqs.com.au";
string strSubjectLine = "Testing";
string strTemplateName = "Shield";
string strHtmlMessageText = "This is a test message";
psIMAlertLib objPsIMAlertLib = new psIMAlertLib();
objPsIMAlertLib.EnabledLogging();
List<SendRecipientOutcome> aOutcomes =
objPsIMAlertLib.SendAlert
(
strFrom,
new string[] { strTo },
strSubjectLine,
strTemplateName,
strHtmlMessageText
);
if (aOutcomes != null)
{
foreach (SendRecipientOutcome objOutcome in aOutcomes)
{
Console.WriteLine("{)}: {1}",
objOutcome.Uri, objOutcome.ResponseCode);
}
}
Console.WriteLine("Completed.");
}
13. From the Project menu select psIMAlertLibTest Properties.

14. On the left hand side tab select Build

15. In the Platform Target pulldown select x64


16. In the Build menu select Build solution.
17. Signin using Lync or Microsoft Office Communicator 2007 R2 as the recipient (in our example
This e-mail address is being protected from spambots. You need JavaScript enabled to view it
)
18. In Program.cs select the last line of Main
Console.WriteLine("Completed.");
19. From the Debug menu select Toggle Breakpoint
![]()
20. From the Debug menu select Start Debugging
21. Select the Popup toast.


22. Inspect the log file
C:\ProgramData\Blue Quality Studios\psIMAlert\Log\psIMAlert.log
© 2010 Blue Quality Studios
All Rights Reserved.