How to use official SDKs for Hostinger Mail API

Updated 5 days ago
Hostinger provides official SDKs for the Mail API, making it easy for developers to integrate email functionality into their applications. Instead of writing raw HTTP requests, you can install a ready-made SDK in one command and start sending emails right away.

Available SDKs and installation

Choose the SDK for your programming language and install it using your package manager:

PHP
composer require hostinger/mail-api-php-sdk

TypeScript / Node.js
npm install hostinger-mail-api-sdk

Python
pip install hostinger-mail-api

What is included?

All three SDKs come with the following built-in:
  • API-key authentication: securely connect to the Hostinger Mail API
  • Sending email: send transactional or custom emails with minimal code
  • Typed error handling: clear, predictable error responses
  • Retries and timeouts: built-in resilience for network issues
  • Webhook payload parsing: easily process incoming Mail API events
  • Quickstart README: copy-paste examples to get started immediately

Getting started

After installing the SDK for your language, refer to the quickstart README included in the package. It covers authentication setup and your first email send with copy-paste code examples.