Reputation: 11
I use the Mailjet API PHP library. And I want to send an email with a template.
How can I add template parameters to my function sendEmail
?
Thanks
Upvotes: 1
Views: 1349
Reputation: 301
Template parameters can not be added in the function "sendEmail". However, you can add template parameters using the function "send". Please note that it requires JSON payload. See here: https://github.com/mailjet/mailjet-apiv3-php-simple/blob/master/doc/_send-api.md#sending-a-basic-email
Also, please note that the wrapper you use mailjet-apiv3-php-simple is considered deprecated and is on maintenance only. We strongly advise you to consider implementing our new PHP wrapper.
P.S. Question linked to Github issue - https://github.com/mailjet/mailjet-apiv3-php-simple/issues/130
Upvotes: 1