Created
March 26, 2015 15:07
-
-
Save martyndavies/25e4266bdb4e7c04391a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// This is the example from https://github.com/sendgrid/sendgrid-php#headers | |
// but slight modifications have been made to include code for IP Pooling | |
$email = new SendGrid\Email(); | |
->addTo('foo@bar.com') | |
->addTo('bar@foo.com') | |
->setFrom('me@bar.com') | |
->setSubject('Subject goes here') | |
->setText('Hello World!') | |
->setHtml('<strong>Hello World!</strong>') | |
->addHeader('X-Smtpapi', {'ip_pool': 'pool_name'}) | |
; | |
// Send it | |
$sendgrid->send($email); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment