Download the PHP package desttools/transmail without Composer

On this page you can find all versions of the php package desttools/transmail. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package transmail

Zoho ZeptoMail API PHP Client

Unofficial PHP client for Zoho's ZeptoMail transactional email API.

ZeptoMail is intended for transactional emails triggered by website or app interactions (receipts, password resets, 2FA notices, etc.), not bulk campaigns or newsletters. See the ZeptoMail site for use-case guidelines.


Installation

Install via Composer:

Or add to composer.json:

You can also clone this repository and include the file directly.


v2: ZeptoMail\ZeptoMailClient (PHP 8.0+)

Setup

You'll need a send-mail token from your ZeptoMail dashboard. A bounce address is optional but recommended.

Set them as environment variables:

Or pass them directly to the constructor (see examples below).

Note: The sender domain must be verified in your ZeptoMail dashboard before messages will be accepted.

Load the library:

Basic Example

Full Example

All available options, including passing credentials directly:

Multiple Recipients

to, cc, and bcc each accept either a single ['email', 'name'] pair or an array of such pairs:

Address Formatting

Addresses can be passed as a plain string or as an array. When an array is used, the library detects which element is the email address and uses the other as the display name:

Error Handling

By default, send() returns true on success and false on failure.

Pass true as the fourth constructor argument to enable verbose mode. In verbose mode, send() returns the full API response object on API calls (success or failure), or an error string if the cURL request itself fails. This is useful for debugging but may expose sensitive account information — disable it in production.

The constructor throws \InvalidArgumentException if no API key can be found (neither passed directly nor set as zeptomailkey in the environment), or if subject, from, or to are missing from the message.

Additional MIME Headers

Attachments

The library passes attachment data through to the API as-is. Please note that ZeptoMail has a 15MB weight limit for all attachments. Build the attachment array yourself, base64-encoding the file content:

List of attachment types unsupported by ZeptoMail


v1: Transmail\TransmailClient (legacy)

v1 is no longer actively maintained. It continues to work but does not receive bug fixes or new features. New projects should use ZeptoMail\ZeptoMailClient above.

If you are upgrading from v1, see the migration notes below.

Setup (v1)

Basic Example (v1)

Full Example (v1)


Migrating from v1 to v2

v1 v2
File TransmailClient.php ZeptoMailClient.php
Namespace / class Transmail\TransmailClient ZeptoMail\ZeptoMailClient
Composer desttools/transmail:^1.0 desttools/transmail:^2.0
API key env var transmailkey zeptomailkey
Bounce env var transbounceaddr zeptobounceaddr
No API key found Returns false / error string (silently ignored) Throws \InvalidArgumentException
Multiple recipients Not supported Pass an array of ['email', 'name'] pairs
Bounce address Required Optional

Message field names (subject, htmlbody, to, from, etc.) are identical between versions.


SMTP

This library only sends through the ZeptoMail HTTP API. For SMTP relay, consult your mail server's documentation or the ZeptoMail SMTP docs.


ZeptoMail API Documentation


All versions of transmail with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package desttools/transmail contains the following files

Loading the files please wait ...