Download the PHP package monkeyscloud/monkeyslegion-mail without Composer

On this page you can find all versions of the php package monkeyscloud/monkeyslegion-mail. 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 monkeyslegion-mail

MonkeysLegion Mail

PHP Version

A powerful, feature-rich mail package for the MonkeysLegion PHP framework, providing robust email functionality with DKIM signing, queue support, rate limiting, and elegant template rendering.

📋 What's Inside

This comprehensive mail package includes everything you need for professional email handling:

🚀 Getting Started

📧 Core Email Features

🛡️ Security & Authentication

🎨 Template System

Advanced Features

🔧 Developer Tools


🚀 Quick Start

Installation

Basic Configuration

Add these variables to your .env file:

You can always check the mail.php config file to see all the available options you can set in your .env

Test Your Setup


📧 Sending Emails

Direct Sending

Queue-Based Sending

Using Mailable Classes


🎨 Mailable Classes

Mailable classes provide an elegant, object-oriented way to compose emails with templates, data binding, and fluent configuration.

Creating a Mailable

Example Mailable Class

Using Mailable Classes

Mailable Features

Template Binding

Overridable Properties

Child classes can override these properties to set defaults:

Available Configuration Methods

Method Description Example
setTimeout(int $timeout) Set job timeout in seconds ->setTimeout(120)
setMaxTries(int $tries) Set maximum retry attempts ->setMaxTries(5)
setContentType(string $type) Set content type ->setContentType('text/plain')
addAttachment(string $path, ?string $name, ?string $mime) Add file attachment ->addAttachment('/path/file.pdf', 'Invoice.pdf')
setAttachments(array $attachments) Set all attachments ->setAttachments($fileArray)

Attachments

Conditional Logic


📊 Queue System

The queue system allows you to send emails in the background, improving application performance and providing retry capabilities.

How It Works

  1. Queue Email: Email is serialized and stored in Redis
  2. Worker Processing: Background worker picks up jobs
  3. Retry Logic: Failed jobs are automatically retried
  4. Failure Handling: Permanently failed jobs are moved to failed queue

Queue Benefits

Example Queue Workflow

Queue Monitoring


🔧 CLI Commands

The mail package includes powerful CLI commands for testing, queue management, and maintenance.

Email Testing

DKIM Key Generation

Queue Management

Queue Worker Configuration

Configure worker behavior in config/redis.php:


🛡️ DKIM Email Signing

DKIM (DomainKeys Identified Mail) adds digital signatures to your emails, improving deliverability and preventing spoofing.

Why DKIM Matters

Setting Up DKIM

1. Generate DKIM Keys

2. Configure Environment

3. Add DNS Record

Create a TXT record in your DNS:

4. Verify DKIM

DKIM Features


⚙️ Configuration

Driver Configuration

SMTP Driver

Mailgun Driver

Null Driver

Sendmail Driver

Rate Limiting

Configure rate limiting in config/rate_limiter.php:


🎯 Rate Limiting

Prevent spam and control email sending rates with built-in rate limiting.

Configuration

Rate limiting is configured in the config/rate_limiter.php file:

Available Methods

Scheduled Cleanup

Add to your cron jobs:


🎨 Template System

Create beautiful, reusable email templates with the ML View engine.

For complete template documentation, see: MonkeysLegion Template Engine

Email Components

The package includes pre-built email components

📝 Logging

Comprehensive logging helps you monitor email delivery and debug issues. Logging behavior is controlled by your application mode in the .env file.

Configuration

Logging is automatically configured based on your application environment:

Log Levels by Environment

Production Mode (APP_ENV=prod)

Development Mode (APP_ENV=dev)

Testing Mode (APP_ENV=test)

Log Examples

Log File Locations

Logs are stored in different locations based on your environment:

Custom Logging


🚀 Advanced Usage

Multiple Drivers

Bulk Email Processing


🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Development Setup


📄 License

This package is open-sourced software licensed under the MIT license.


🆘 Support


Made with ❤️ by the MonkeysLegion Team


All versions of monkeyslegion-mail with dependencies

PHP Build Version
Package Version
Requires php Version ^8.4
league/commonmark Version ^2.7
monkeyscloud/monkeyslegion-core Version ^1.0
monkeyscloud/monkeyslegion-cli Version ^1.0
monkeyscloud/monkeyslegion-di Version ^1.0
monkeyscloud/monkeyslegion-template Version ^1.0
psr/log Version ^3.0
vlucas/phpdotenv Version ^5.6
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 monkeyscloud/monkeyslegion-mail contains the following files

Loading the files please wait ....