Skip to content

Simplifies the integration of Transmitly into ASP.NET Core MVC applications by providing utilities for handling delivery reports from various channel providers

License

Notifications You must be signed in to change notification settings

transmitly/transmitly-microsoft-aspnetcore-mvc

Repository files navigation

Transmitly.Microsoft.AspnetCore.Mvc

A Transmitly utility package for handling registration and controllers for channel provider delivery reports.

Getting started

To use install the NuGet package:

dotnet add package Transmitly.Microsoft.AspnetCore.Mvc

Then add the model binders using AddChannelProviderDeliveryReportModelBinders():

using Transmitly;
...
 public static void Main(string[] args)
{
	var builder = WebApplication.CreateBuilder(args);
	builder.Services
		.AddTransmitly(tly => {...})
		.AddChannelProviderDeliveryReportModelBinders()
}

Using Default Delivery Report Controller

Inheriting the ChannelProviderDeliveryReportController will setup an POST route named, HandleDeliveryReport (example: https://yourapp.com/Communications/HandleDeliveryReport) that will automatically trigger your registered delivery report handlers for the provided ICommunicationsClient.

The HandleDeliveryReport method can be overridden. Allowing you to customize behaviors and set route specifics.

MyDeliveryReportsController.cs

using System;
using System.Web.Mvc;
using Transmitly;
using Transmitly.Delivery;

namespace Transmitly.Aspnet.Mvc.Examples
{
	[AllowAnonymous]
	public class CommunicationsController : ChannelProviderDeliveryReportController
	{
		public CommunicationsController(ICommunicationsClient communicationsClient) : base(communicationsClient)
		{
		}
	}
}
  • See the Transmitly project for more details on how use and configure the library.
an open-source project sponsored by CiLabs of Code Impressions, LLC

Copyright © Code Impressions, LLC - Provided under the Apache License, Version 2.0.

About

Simplifies the integration of Transmitly into ASP.NET Core MVC applications by providing utilities for handling delivery reports from various channel providers

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages