swiftmailer - How to make SUBJECT Substitutions in Sendgrid Swift SmtpTransport? -


i using swift smtptransport seems recommended way.

however documentation found dos not show how achieve subject substitutions.

this answered on github, answering here too, folks future reference.

to use smtpapi substitute subjects, you'll need substitution tags in subject of email , include x-smtpapi header substitution tags defined.

using sendgrid smtpapi library:

<?php ... $message->setsubject('[sendgrid-php-example] owl named %yourname%'); $header           = new smtpapi\header(); $header->addsubstitution("%yourname%", array("mr. owl"))-> ... 

Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -