Download the PHP package mahrdanial/shwanix-mailer without Composer

On this page you can find all versions of the php package mahrdanial/shwanix-mailer. 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 shwanix-mailer

Shwanix Mailer for Laravel

Send Laravel mail through the Shwanix HTTP mail API (JSON POST) instead of SMTP. Works with standard Mail facades, Mailables, and queues.

Requirements: PHP ^8.0, Guzzle ^7.5, Laravel ^7.30 through ^12.0 (see below).

Laravel & PHP: Supports Laravel 7.30+ through 12.x (Composer cannot install this package on Laravel 7.0–7.29). Laravel 7 requires PHP 8 via 7.30.x for use with this package. Laravel 11+ needs PHP ^8.2 (framework requirement). Internally, Laravel 7–8 use a SwiftMailer transport (legacy/SwiftShwanixTransport.php); Laravel 9+ use Symfony Mailer (ApiTransport).

Installation

From your Laravel application root:

The service provider is auto-discovered; you do not need to register it manually.

Publish the optional configuration file:

This creates config/shwanix-mail.php (endpoint URL, API key, HTTP timeouts, SSL verification).

What MAIL_MAILER=shwanix does

Laravel’s mail stack is driven by config/mail.php. The mailer (sometimes called “driver” in docs) decides how messages are sent: smtp, log, array, etc.

Setting MAIL_MAILER=shwanix tells Laravel to use this package’s custom transport. The provider registers it with Mail::extend('shwanix', …), so the name shwanix must appear in your mailers config (see below). You can still use other mailers (smtp, log) for different messages via Mail::mailer('smtp'), etc.

Configuration

1. Environment (.env)

Required:

SHWANIX_MAIL_KEY is required. Use the plain secret registered for your app (validated server-side). It is sent as the api_key field in JSON (no attachments) or in multipart/form-data when files are attached.

Optional tuning (defaults are set in config/shwanix-mail.php):

The default API URL is defined in the published config/shwanix-mail.php file. Set SHWANIX_MAIL_URL in .env only when you need to override that value.

2. Mail config (config/mail.php)

Register the shwanix mailer under mailers:

To use Shwanix for all outgoing mail by default:

Usage

Use Laravel’s mail API as usual. Ensure SHWANIX_MAIL_KEY is set in .env so requests authenticate with the Shwanix API.

Explicit mailer:

Behaviour

Feature Behaviour
Recipients to: one string (comma-separated if multiple). cc / bcc: omitted when empty; otherwise a string for one address or a JSON array for several (matches the Shwanix API). Logs include recipient_count.
Body Prefers HTML; otherwise plain text.
Attachments With attachments: multipart/form-data with attachments[] file parts (decoded from Symfony/Swift parts). Without attachments: application/json with optional attachments as base64 objects.
Success info log with recipient_count and HTTP status.
Failure Non-2xx HTTP, Guzzle errors, or JSON { "status": false, "message": "..." }TransportException and error logs.

HTTP payload

Responses are still treated as JSON when the server returns a JSON body (e.g. { "status": true }).

Implementation note (transport base class)

Releasing

Tag a stable version so Composer can resolve a default release:

Then install with:

License

MIT.


All versions of shwanix-mailer with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
guzzlehttp/guzzle Version ^7.5
illuminate/mail Version ^7.30|^8.0|^9.0|^10.0|^11.0|^12.0
illuminate/support Version ^7.30|^8.0|^9.0|^10.0|^11.0|^12.0
symfony/mailer Version ^5.4|^6.0|^7.0
symfony/mime Version ^5.4|^6.0|^7.0
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 mahrdanial/shwanix-mailer contains the following files

Loading the files please wait ...