We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I need add some custom header to mail for testing purposes. Something like:
X-Some-Secret-Code-From-Email: 123 X-New-User-Password: qwerty
We could add new property $customHeaders to Mailer
$customHeaders
Pass it here.
Handle it on mail render here
For example add evend dispatch here.
$msg = new Email(); if ($message->getFrom() !== null) { $msg->from($message->getFrom()); } $msg->to(...$message->getTo()); $msg->cc(...$message->getCC()); $msg->bcc(...$message->getBCC()); // new feature $event = $this->eventDispatcher->dispatch(new PreRenderEvent(message: $message, email: $msg)); try { // render message partials $view->render(\array_merge(['_msg_' => $event->email], $event->message->getData())); } catch (ViewException $e) { }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Description
I need add some custom header to mail for testing purposes.
Something like:
We could add new property
$customHeaders
to MailerPass it here.
Handle it on mail render here
UPD it will be great to give user customize final email
For example add evend dispatch here.
The text was updated successfully, but these errors were encountered: