PHPackages                             gryfoss/twig-smart-mailer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. gryfoss/twig-smart-mailer

ActiveLibrary

gryfoss/twig-smart-mailer
=========================

Smart mailer based on Symfony Mailer which supports dynamic source mailboxes and easy integration of files within emails

v1.0.0(8mo ago)0127MITPHPCI passing

Since Aug 19Pushed 8mo agoCompare

[ Source](https://github.com/GryfOSS/twig-smart-mailer)[ Packagist](https://packagist.org/packages/gryfoss/twig-smart-mailer)[ RSS](/packages/gryfoss-twig-smart-mailer/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (11)Versions (2)Used By (0)

GryfOSS: Twig Smart Mailer
==========================

[](#gryfoss-twig-smart-mailer)

[![Tests status](https://github.com/GryfOSS/twig-smart-mailer/actions/workflows/tests.yml/badge.svg)](https://github.com/GryfOSS/twig-smart-mailer/actions/workflows/tests.yml/badge.svg)[![GitHub tag (latest SemVer)](https://camo.githubusercontent.com/6ef7c4e91866d6e54900f34b9fba91674de038a6461369c6c5c29538ec33498c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f677279666f73732f747769672d656173792d6d61696c65723f6c6162656c3d6c617465737425323076657273696f6e26736f72743d73656d766572)](https://camo.githubusercontent.com/6ef7c4e91866d6e54900f34b9fba91674de038a6461369c6c5c29538ec33498c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f677279666f73732f747769672d656173792d6d61696c65723f6c6162656c3d6c617465737425323076657273696f6e26736f72743d73656d766572)

Smart mailer is a simple library which assists sending of emails with use of symfony/mailer component. At the moment it requires SMTP connection, but grants features like easy embedding of images, easier attachments adding, exceptions tracking and use of string templates instead of files.

Features
--------

[](#features)

- **Twig Template Support**: Use Twig syntax in both HTML and text email content
- **Easy File Attachments**: Simple attachment management with validation
- **Embedded Images**: Support for inline images with automatic MIME type detection
- **Multiple Recipients**: Support for To, CC, and BCC recipients
- **DSN Configuration**: Flexible transport configuration via DSN strings
- **Gmail Integration**: Built-in Gmail transport support
- **Testing Support**: File-based mailer for development and testing
- **Exception Handling**: Comprehensive exception hierarchy for error handling

Quick Start
-----------

[](#quick-start)

```
