Skip to content

v1.1.2

Choose a tag to compare

@ludvikjerabek ludvikjerabek released this 03 Sep 01:58
· 3 commits to master since this release
73cce9a

Release v1.1.2

Release Date: September 2, 2025
NuGet Package: Proofpoint.SecureEmailRelay.Mail v1.1.2

What’s New

  • Added optional region selection via Region.US , Region. EU , and Region.AU . The default region is US when no value is specified.
using Proofpoint.SecureEmailRelay.Mail;

class Program
{
    static async Task Main()
    {
        // Default region when not specified is Region.US
        var client = new Client("<client_id>", "<client_secret>", Region.US);

        // Create a new Message object using the fluid builder
        var message = Message.Builder()
            .From("sender@example.com", "Joe Sender")
            .To("recipient1@example.com", "Recipient 1")
            .To("recipient2@example.com", "Recipient 2")
            .Subject("This is a test email")
            .Content("This is a test message", ContentType.Text) // Plain text alternative
            .Attachment(Attachment.Builder()
                .FromFile("C:/temp/logo.png")
                .DispositionInline(out string logoId) // Dynamic Content-ID
                .Build())
            .Content($"<b>This is a test message</b><br><img src=\"cid:{logoId}\">", ContentType.Html) // Single HTML body
            .Cc("cc1@example.com", "CC Recipient 1")
            .Cc("cc2@example.com", "CC Recipient 2")
            .Bcc("bcc1@example.com", "BCC Recipient 1")
            .Bcc("bcc2@example.com", "BCC Recipient 2")
            .Attachment(Attachment.Builder()
                .FromBase64("VGhpcyBpcyBhIHRlc3Qh", "test.txt")
                .Build())
            .Attachment(Attachment.Builder()
                .FromFile("C:/temp/file.csv")
                .Build())
            .Attachment(Attachment.Builder()
                .FromBytes(new byte[] { 1, 2, 3 }, "bytes.txt")
                .MimeType("text/plain")
                .Build())
            .ReplyTo("noreply@proofpoint.com", "No Reply")
            .Build();

        // Send the email
        var result = await client.Send(message);

        Console.WriteLine($"HTTP Response: {result.HttpResponse.StatusCode}/{(int)result.HttpResponse.StatusCode}");
        Console.WriteLine($"Reason: {result.Reason}");
        Console.WriteLine($"Message ID: {result.MessageId}");
        Console.WriteLine($"Request ID: {result.RequestId}");
    }
}

Breaking Changes

  • None

How to Upgrade

Update via NuGet:

dotnet add package Proofpoint.SecureEmailRelay.Mail --version 1.1.2

Links

NuGet Package
Source Code
Documentation

Full Changelog: https://github.com/pfptcommunity/ser-mail-api-csharp/commits/v1.1.2