prezent / ink-bundle
Easy responsive e-mails using Foundation and Inky
Installs: 11 239
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 7
Forks: 1
Open Issues: 0
pkg:composer/prezent/ink-bundle
Requires
- php: ^7.0|^8.0
- lib-libxml: >=2.7.8
- pelago/emogrifier: ^5.0|^6.0|^7.0
- prezent/inky: ^0.1
- symfony/framework-bundle: ^5.0|^6.0
- symfony/mailer: ^5.0|^6.0
- symfony/twig-bundle: ^5.0|^6.0
Requires (Dev)
- phpunit/phpunit: ^9.5
- symfony/browser-kit: ^5.0|^6.0
- symfony/css-selector: ^5.0|^6.0
- symfony/phpunit-bridge: ^5.0|^6.0
- symfony/web-profiler-bundle: ^5.0|^6.0
- symfony/yaml: ^5.0|^6.0
- twig/twig: ^2.0|^3.0
README
Easy responsive e-emails using Foundation and Inky
namespace AppBundle\Controller; use Symfony\Bundle\FrameworkBundle\Controller\Controller class AppController extends Controller { public function emailAction() { $message = $this->get('prezent_ink.factory')->getMessage('AppBundle:Mail:hello.eml.twig', [ 'user' => $this->getUser(), ]); $message ->setFrom('noreply@example.org') ->setTo('john.doe@example.org') ; $this->get('mailer')->send($message); } }
{% extends 'PrezentInkBundle::base.eml.twig' %}
{% block stylesheets %}
<link rel="stylesheet" href="@AppBundle/Resources/public/css/email.css" />
{% endblock %}
{% block subject %}Hello {{ user.username }}{% endblock %}
{% block body_text %}
Hello {{ user.username }},
Nice to meet you!
{% endblock %}
{% block body_html %}
<container>
<h1>Hello {{ user.username }},</h1>
<spacer size="16"></spacer>
<callout>Nice to meet you!</callout>
</container>
{% endblock %}
The documentation can be found in Resources/doc