NotificationServices 1.0.2
See the version list below for details.
dotnet add package NotificationServices --version 1.0.2
NuGet\Install-Package NotificationServices -Version 1.0.2
<PackageReference Include="NotificationServices" Version="1.0.2" />
paket add NotificationServices --version 1.0.2
#r "nuget: NotificationServices, 1.0.2"
// Install NotificationServices as a Cake Addin #addin nuget:?package=NotificationServices&version=1.0.2 // Install NotificationServices as a Cake Tool #tool nuget:?package=NotificationServices&version=1.0.2
The current version supports sending out sms, emails and push notifications via AWS services. It supports this via a Basic AWS authentication method. To start with setting the credentials use the Configuration class:
Congifuration.Instance.AWSAccessKey = "<your access key>";
Congifuration.Instance.AWSSecretKey = "<your secret key>";
Congifuration.Instance.AWSFCMPNSARN = "<your arn for fcm>";
Congifuration.Instance.AWSIOSPNSARN = "<your arn for ios>";
Congifuration.Instance.AWSRegionEndPoint = "<your region endpoint>";
To send out emails get an instance of IEmailSender via EmailSenderFactory. You can then send the email by calling SendAWSEmailAsync. It expects 4 parameters.
- Source: The source/sender of the email. This needs to be verified in the Simple Email Service
- ToEmail: The recipient of the email
- TemplateName: The name of the template to use. You can create templates from cli and can learn more from here. https://docs.aws.amazon.com/ses/latest/DeveloperGuide/send-personalized-email-api.html
- TemplateData: The data to substitute in the Template. See the above link to see how to pass the data.
var EmailSender = EmailSenderFactory.GetAWSEmailSender();
EmailSender.SendAWSEmailAsync("noreply@services.com", "recipient@services.com", "ConfirmEmailTemplate", $"{{ \"Link\":\"{EmailCallbackUrl}\", \"Name\": \"{FirstName}\" }}");
To send out sms get an instance of ISMSSender via SMSSenderFactory. You can then send the email by calling SendSmsAsync. It expects 4 parameters.
- number: The recipient number to which the sms needs to be sent.
- message: Text Message to be sent.
- SenderId: This is an optional parameter whose default value is "Notif". The sender id to be displayed when the sms is received.
- SMSType: This is an optional parameter whose default value is "Transactional". The type of sms either it is "Promotional" or "Transactional".
var SMSSender = SMSSenderFactory.GetAWSSMSSender();
SMSSender.SendSmsAsync("<your number with country code", "Hello World");
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- AWSSDK.Core (>= 3.3.103.35)
- AWSSDK.SimpleEmail (>= 3.3.101.41)
- AWSSDK.SimpleNotificationService (>= 3.3.101.60)
- Newtonsoft.Json (>= 12.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.