The Paubox C# wrapper allows you to construct and send secure, HIPAA compliant messages. This package is the official C Sharp wrapper for the Paubox Email API. The Paubox Email API allows your application to send secure, HIPAA compliant email via Paubox and track deliveries and opens.
SEE ALSO: Why Healthcare Businesses Choose the Paubox Email API
Add the provided class library (Paubox.Email.API.dll and Newtonsoft.Json.dll) in your C# project by using ‘Add Reference’ option within the Project – References node.
You will need to have a Paubox account. You can sign up here. Once you have an account, follow the instructions on the Rest API dashboard to verify domain ownership and generate API credentials.
Include your API credentials in a config file. Add two app settings keys with their values in App.Config (For Desktop App, Windows Service) or Web.Config (For ASP.NET projects):
This library supports .NET v4.6.1. Add the following to your config file:
static SendMessageResponse SendMessage() { Message message = new Message(); Content content = new Content(); Header header = new Header(); message.Recipients = new string[] { "someone@domain.com", "someoneelse@domain.com" }; header.From = "you@yourdomain.com"; message.Bcc = new string[] { "bcc-recipient@domain.com" }; header.Subject = "Testing!"; header.ReplyTo = "reply-to@yourdomain.com"; content.PlainText = "Hello World!"; message.Header = header; message.Content = content; SendMessageResponse response = EmailLibrary.SendMessage(message); return response; }
static SendMessageResponse SendNonTLSMessage() { Message message = new Message(); Content content = new Content(); Header header = new Header(); message.Recipients = new string[] { "someone@domain.com", "someoneelse@domain.com" }; header.From = "you@yourdomain.com"; message.Bcc = new string[] { "bcc-recipient@domain.com" }; header.Subject = "Testing!"; header.ReplyTo = "reply-to@yourdomain.com"; content.PlainText = "Hello World!"; message.AllowNonTLS = true; message.Header = header; message.Content = content; SendMessageResponse response = EmailLibrary.SendMessage(message); return response; }
static void GetEmailDisposition() { GetEmailDispositionResponse response = EmailLibrary.GetEmailDisposition("2a3c048485aa4cf6"); }