Download the PHP package stechstudio/laravel-helo-email without Composer

On this page you can find all versions of the php package stechstudio/laravel-helo-email. 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 laravel-helo-email

Laravel Helo Email

Send Laravel mail through Helo's API, and call the rest of Helo's API from your app. Set your mailer to helo, add an API key, and your Mailables, notifications, and Mail::raw calls send through Helo.

Install

Add these lines to .env:

A Helo API key covers either all channels or one. With a key for all channels, HELO_CHANNEL_ID picks the channel to send through. With a key for one channel, sending works without it, but set it anyway: Helo requires a channel ID for suppressions, broadcast lists, and new webhooks.

You don't need to change config/mail.php. The package adds a helo mailer when your config doesn't define one.

To change the defaults, publish the config:

Key Env Default
key HELO_API_KEY none
channel_id HELO_CHANNEL_ID none
mail_type HELO_MAIL_TYPE transactional
base_url HELO_BASE_URL https://api.helohq.com
timeout 30 seconds

A missing API key fails on the first request, not at boot, so config:cache and test suites that never send keep working.

Several channels or mail types

Add a mailer to config/mail.php for each extra channel or mail type. Settings you put there override config/helo.php. A key limited to one channel can't reach another, so a mailer for another channel needs a key for it, unless your main key covers all channels.

To send broadcast mail through your main channel, leave out key and channel_id and set only mail_type.

Sending options

Tags and metadata. Laravel's tag() and metadata() become Helo's tags and metadata:

Tracking. Turn open or link tracking on or off for one message:

Safe retries. Add an X-Helo-Idempotency-Key header with a value that's unique to the message, such as order-42-receipt. Helo sends a message with a given key only once, so this is the only safe way to retry a send that may have gone through.

A retry must send exactly the same request, or Helo rejects the key. The transport leaves out the Message-ID header and gives inline images stable IDs, so rebuilding the same email gives the same request.

Broadcast mail. Set mail_type to broadcast for marketing and bulk mail. Helo adds its own unsubscribe link and List-Unsubscribe headers to every broadcast message, and you can't point them at your own page. Put {{{ helo: unsubscribe }}} in your template to choose where the link appears. Without it, Helo adds the link at the end. Transactional mail gets no link.

After sending

$sent->getMessageId() returns Helo's message ID, the same ID Helo's webhooks carry.

HeloResult::from($sent) returns the full result, including any recipients Helo skipped because they're suppressed:

The package also fires STS\HeloEmail\Events\HeloMessageSent after each send, with the sent message and the result.

API client

The Helo facade covers the rest of Helo's API. Methods take named arguments that match Helo's parameter names.

Every resource also has get, update, and delete where Helo supports them.

Responses. A single object is a Response. Read a field as $domain->status or $domain['status']. Fields Helo adds later pass through. Key fields:

Resource Fields
Send status, messageId, suppressions; a broadcast returns broadcastId
Suppression email, reason, createdAt
Webhook id, url, events, enabled, payloadSigningKey
Channel id, name, deliveryType
Domain verify domainKeyActive, returnPath, each with host, type, status
Activity events have eventType; messages have id, status, events
Broadcast id, status

A batch send or suppression change that Helo rejects for one address comes back inside a successful response. Check each suppression result's success, or each batch response's status. A single send that Helo rejects throws.

Paging. A list returns a Page with the first page of items. Call ->lazy() to walk every page; it fetches the next page only when the loop needs it.

Other channels. Helo::forChannel($id, $key) returns a client for another channel, for apps that send for many customers. If your key covers all channels, the channel ID is enough. If each channel has its own key, pass that key too.

Suppressions, broadcast lists, and new webhooks need a channel ID, even with a key for one channel. Pass channelId:, use forChannel(), or set HELO_CHANNEL_ID.

New parameters. Methods that take named parameters also accept extra:, which is merged into the request. A new Helo parameter works before this package adds it.

Errors

A failed request throws STS\HeloEmail\HeloException:

Connection failures throw Laravel's ConnectionException.

When Laravel sends mail, any failure becomes a Symfony TransportException, so Laravel's failover mailer works. The package never retries a send on its own, because a retry could deliver twice. Use an idempotency key to retry safely.

Testing your app

Fake Helo's API with Laravel's HTTP fake:

Not included

Live check

scripts/live-check.php sends one email through a real Helo account and lists the first page of suppressions. CI never runs it.

License

MIT. See LICENSE.md.


All versions of laravel-helo-email with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
guzzlehttp/guzzle Version ^7.8
illuminate/http Version ^12.0|^13.0
illuminate/mail Version ^12.0|^13.0
illuminate/support Version ^12.0|^13.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 stechstudio/laravel-helo-email contains the following files

Loading the files please wait ...