Skip to content

Commit 63cc1e5

Browse files
committed
Supply Example Usage
1 parent 2834b43 commit 63cc1e5

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

src/Examples/Warden.Examples.Console/Program.cs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
using Warden.Integrations.HttpApi;
88
using Warden.Integrations.MsSql;
99
using Warden.Integrations.Slack;
10+
using Warden.Integrations.Smtp;
1011
using Warden.Utils;
1112
using Warden.Watchers;
1213
using Warden.Watchers.Disk;
@@ -87,6 +88,21 @@ private static IWarden ConfigureWarden()
8788
// .OnFirstSuccessAsync(results =>
8889
// integrations.SendGrid().SendEmailAsync("Everything is up and running again!"));
8990
//})
91+
//Set SMTP Details
92+
//.IntegrateWithSmtp("smtp.office365.com", 587, true, cfg =>
93+
//{
94+
// cfg.WithCredentials("[email protected]", "mySecretPassword")
95+
// .WithDefaultSubject("Notification Email from Warden")
96+
// .WithDefaultToAddress("[email protected]")
97+
// .WithDefaultFromAddress("[email protected]");
98+
//})
99+
//.SetAggregatedWatcherHooks((hooks, integrations) =>
100+
//{
101+
// hooks.OnFirstFailureAsync(result =>
102+
// integrations.Smtp().SendEmailAsync("Monitoring errors have occured."))
103+
// .OnFirstSuccessAsync(results =>
104+
// integrations.Smtp().SendEmailAsync("Everything is up and running again!"));
105+
//})
90106
//Set proper URL of the Warden Web API
91107
.IntegrateWithHttpApi("https://panel.getwarden.net/api",
92108
"pMBXwekquqlfvGPXTNT1k32RHisgguAV2yv3tJq1Wq0d2eqMsx2HuR97Lfc=",

0 commit comments

Comments
 (0)