Download the PHP package lemonade/email-generator without Composer

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

Email Generator

License Build Status Packagist Version PHP Version

Email Generator is a PHP library for generating emails using the Twig templating system. This library allows easy template handling and provides a flexible way to integrate email generation into your project.

Basic Functionality

Email Generator provides an easy-to-use PHP library that leverages the power of the Twig templating engine to generate dynamic emails. The library is highly flexible and allows you to define custom templates for your emails, inject data into those templates, and render them as HTML or plain text emails. Here's how it works:

  1. Template Rendering: The core feature is the ability to create email templates using Twig. These templates can contain placeholders (variables) that will be replaced by dynamic content at runtime.
  2. Data Injection: You can pass data (such as user information, order details, etc.) into the templates. The library supports various data types, including arrays, objects, and scalars, allowing you to use your own application logic to populate the email content.
  3. Multi-Language Support: The library supports translations out of the box, allowing you to generate emails in different languages by swapping dictionaries based on the user's preferred language.
  4. Flexible Email Content: You can customize the content, including using inline CSS and HTML, embedding dynamic variables, or using more complex email layouts. You can also include graphical attachments using URLs provided via DTO.
  5. Seamless Integration: It is designed to integrate seamlessly with any PHP project. The library can be used with frameworks like Laravel, Symfony, or as a standalone tool in any PHP application.
  6. Testable: With the built-in unit tests, you can easily test the behavior of your templates and email generation logic. This ensures that emails are generated correctly under different conditions and with various data inputs.

Installation

To install the library, use Composer:

Usage Example: Lost Password Email

Here’s how to use the DefaultBuilder to create a "lost password" email:


Folders and Structure


Testing

To run the tests, use the following command:

If you have added PHPUnit to your dependencies, the tests will be executed using the phpunit.xml configuration.


FAQ

Q: Can I add attachments to emails?
A: Yes, attachments are supported as graphical elements (e.g., images) that are linked dynamically via URLs. These URLs are part of the DTO system and can be customized per email.

Q: Can I use this library with Laravel?
A: Yes, you can integrate it with Laravel using its built-in service container.


Contributing

We welcome contributions to this project! To contribute, please follow these steps:

  1. Fork this repository.
  2. Create a new branch for your changes.
  3. Submit your changes via a pull request.

License

This project is licensed under the MIT License. For more details, see the LICENSE file.


Contact

For more information or to report an issue, visit the GitHub repository.


All versions of email-generator with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1 <8.5
twig/twig Version ^3.0
monolog/monolog Version ^3.0
psr/log Version ^3.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 lemonade/email-generator contains the following files

Loading the files please wait ....