andrei-mireichyk / sendpulse-mailer
Installs: 2
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 3
Type:symfony-bundle
Requires
- php: 8.0.*
- ext-json: *
- symfony/http-client: ^4.4|^5.0|^6.0
- symfony/mailer: ^4.4|^5.0|^6.0
This package is not auto-updated.
Last update: 2024-11-13 21:32:46 UTC
README
Supported schemes
smtp
MAILER_DSN=sendpulse://USERNAME:PASSWORD@default
smtp api
MAILER_DSN=sendpulse+smtp-api://USER_ID:SECRET@default
Automation360 events
MAILER_DSN=sendpulse+events://USER_ID:SECRET@default
use Creonit\SendPulseMailer\Header\SendPulseVariableHeader; use Symfony\Bundle\FrameworkBundle\Controller\AbstractController; use Symfony\Component\Mailer\MailerInterface; use Symfony\Component\Mime\Email; class MailingController extends AbstractController { public function sendMail(MailerInterface $mailer) { $to = 'example@example.com'; $message = new Email(); $message->to($to); $message->getHeaders() ->addTextHeader('X-SendPulse-Event', 'event_name') ->add(new SendPulseVariableHeader('variable_name', 'value')); $mailer->send($message); } }