Closed andoitz closed 3 years ago
I cant attach variables into my dynamic template.
$email = new \SendGrid\Mail\Mail(); $email->setFrom("my email"); $email->addTo( $request->email, "username", [ 'my_variable' => '12', '{{my_variable}}' => '13', '{{ my_variable}}' => '13' ], 0 ); $email->setTemplateId( new \SendGrid\Mail\TemplateId( "my template id" ) ); $email->addDynamicTemplateDatas(array("my_variable" => "12", "{{my_variable}}" => "13")); $email->addCustomArgs(array("my_variable" => "12", "{{my_variable}}" => "13")); $email->addHeader("x-smtpapi", json_encode(array("my_variable" => "10"))); $sendgrid = new \SendGrid( env("SENDGRID_API_KEY") ); $response = $sendgrid->send($email);
No errors
Issue Summary
I cant attach variables into my dynamic template.
Steps to Reproduce
Code Snippet
Exception/Log
No errors
paste exception/log here
No errors
Technical details: