I use the Sendgrid PHP API and would like to send emails in both text/plain and text/html,
I tried :
$request_body = json_decode('{
"content": [
{
"type": "text/plain",
"value": "text version"
},
{
"type": "text/html",
"value": "html version"
}
],
"subject": "blabla €",
...
}');
$response = $sg->client->mail()->send()->post($request_body);
Result :
no error are generated by Sendgrid.
the subject becomes "blabla €" (if only text/html, the subject received is fine "blabla €")
and I receive an email with only this content-type :
Content-Type: text/html; charset=UTF-8
Result expected :
I would like to send an email simply with 2 content types :
Content-Type: text/plain; charset=UTF-8
and
Content-Type: text/html; charset=UTF-8
is it possible ? Any idea ?