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

Install the SDK

Install from CPAN using cpanminus:
cpanm Paubox_Email_SDK
2

Set your credentials

Create a config.cfg file in your project directory:
API_KEY = YOUR_API_KEY
API_USERNAME = YOUR_USERNAME
The SDK reads this file automatically. To obtain credentials, see Authentication.
3

Send your first email

Create a file send.pl:
use Paubox_Email_SDK;

my $msg = Paubox_Email_SDK::Message->new(
    'from'         => 'sender@yourdomain.com',
    'to'           => ['recipient@example.com'],
    'subject'      => 'Your first Paubox email',
    'text_content' => 'This message was sent with the Paubox Perl SDK.',
);

my $service  = Paubox_Email_SDK->new();
my $response = $service->sendMessage($msg);

print "Response: $response\n";
Run it:
perl send.pl
The response is a JSON string containing sourceTrackingId:
{"sourceTrackingId":"abc123-def456-...","data":{"message":{"id":"..."}}}
4

Check delivery status

Pass the tracking ID to getEmailDisposition:
use JSON;

my $json     = decode_json($response);
my $tracking = $json->{sourceTrackingId};

my $disposition = $service->getEmailDisposition($tracking);
print "Disposition: $disposition\n";
The response JSON includes message_deliveries with per-recipient status.

Next steps

  • Email client: add HTML, attachments, CC/BCC, and handle errors
  • Forms client: retrieve form schemas and submit responses