creonit / sendpulse-mailer
Installs: 4 007
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 0
Forks: 3
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=7.2.5
- ext-json: *
- symfony/http-client: ^4.4|^5.0
- symfony/mailer: ^4.4|^5.0
This package is auto-updated.
Last update: 2024-10-23 20:00:27 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); } }