Is it possible to use https://github.com/symfony/symfony/blob/7.0/src/Symfony/Component/Mailer/Bridge/Sendgrid/Transport/SendgridApiTransport.php to achieve https://github.com/symfony/symfony/blob/7.0/src/Symfony/Component/Mailer/Bridge/Sendgrid/Transport/SendgridApiTransport.php#L128-L137
From what I see the transport only supports custom_args, but I might be missing something, by docs
{ "from": {
"name": "myname",
"email": "[email protected]"
},
"personalizations": [
{
"to": [
{
"email": "[email protected]"
}
],
"substitutions": {
"-name-": "Alice"
}
},
{
"to": [
{
"email": "[email protected]"
}
],
"substitutions": {
"-name-": "Bob"
}
}
],
"subject": "New mail",
"content": [
{
"type": "text/plain",
"value": "Hi -name-, lorem ipsum"
}
]
}
should be the proper payload to achieve substitutions
When I hardcode the above payload in the transport, I get the expected output.
I’ve tried to add metadataheaders but that only seems to affect custom_args