Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.paubox.com/llms.txt

Use this file to discover all available pages before exploring further.

1

Add the DLL reference

Download or clone the SDK repository, then add lib/Paubox.Email.API.dll as a reference in your project.In Visual Studio: right-click your project → AddReferenceBrowse → select Paubox.Email.API.dll.Or in your .csproj:
<ItemGroup>
  <Reference Include="Paubox.Email.API">
    <HintPath>lib\Paubox.Email.API.dll</HintPath>
  </Reference>
</ItemGroup>
2

Instantiate the client

Pass your API key and username directly to the constructor:
using Paubox;

var emailLib = new EmailLibrary("YOUR_API_KEY", "YOUR_USERNAME");
For ASP.NET Core applications, see Authentication for the IConfiguration approach.
3

Send your first email

var message = new Message
{
    Recipients = new[] { "recipient@example.com" },
    Header = new Header
    {
        From    = "sender@yourdomain.com",
        Subject = "Your first Paubox email"
    },
    Content = new Content
    {
        PlainText = "This message was sent with the Paubox C# SDK."
    }
};

SendMessageResponse response = emailLib.SendMessage(message);

Console.WriteLine("Sent. Tracking ID: " + response.SourceTrackingId);
4

Check delivery status

GetEmailDispositionResponse disposition =
    emailLib.GetEmailDisposition(response.SourceTrackingId);

foreach (var delivery in disposition.Data.Message.MessageDeliveries)
{
    Console.WriteLine($"{delivery.Recipient}{delivery.Status.DeliveryStatus}");
}

Next steps

  • Email client: bulk send, attachments, dynamic templates, error handling
  • Forms client: retrieve form schemas and submit responses