Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Mailer Bundle Laravel Package

eschmar/mailer-bundle

View on GitHub
Deep Wiki
Context7

Mailer Bundle

Conveniently send html/plaintext emails in Symfony4. This bundle ships with a version of Mailgun's Action Email ready to send emails.

test.html.twig

Installation

Composer (Packagist):

composer require eschmar/mailer-bundle ^1.0.0

Usage

The eschmar_mailer service expects templates to have the 3 blocks subject, body_html and body_plain and already includes a layout file @EschmarMailer/Mail/layout.html.twig ready to go. I do not recommend using embedded base64 images, this is just for demo purposes. Of course this layout is entirely optional, you may build your own templates. Using the Twig tag {% cssinline %}{% endcssinline %}, CSS styles are inlined (some email clients strip out <head> and <style> tags).

use Eschmar\MailerBundle\Service\Mailer;
// ...

if (!$mailer->send("@EschmarMailer/Mail/test.html.twig", [], $from, $to[, $bcc])) {
    // Oops!
    return;
}

// success

License

MIT License.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
snowsoft/faker
meditationsteps/blogetc
animalyoung/laravel-influxdb
onix-solutions/sms-telera
lonely-lights/prosetta
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin
artisan-build/community-prompts
vleroy/smart
ayles-software/laravel-australian-public-holidays
cboxdk/laravel-id-spatie
cboxdk/laravel-id-billing
cboxdk/laravel-id-billing-bridge
simple-as-fuck/php-performance-log
hsluv/hsluv
seampact/codegen