Skip to content

Instantly share code, notes, and snippets.

@theycallmeswift
Created September 20, 2012 14:59
Show Gist options
  • Save theycallmeswift/3756428 to your computer and use it in GitHub Desktop.
Save theycallmeswift/3756428 to your computer and use it in GitHub Desktop.
SendGrid + Temboo
$session = new Temboo_Session('ACCOUNT_NAME', 'APP_KEY_NAME', 'APP_KEY_VALUE');
$listFolderContents = new Dropbox_ListFolderContents($session);
$inputs = $listFolderContents->newInputs(array('ResponseFormat' => 'json'));
$inputs->setCredential('Dropbox');
$results = $listFolderContents->execute($inputs)->getResults();
$session = new Temboo_Session('ACCOUNT_NAME', 'APP_KEY_NAME', 'APP_KEY_VALUE');
$sendMail = new SendGrid_WebAPI_Mail_SendMail($session);
$inputs->setCredential('Sendgrid');
$inputs->setSubject('Hello World!')
->setHTML('This is my email')
->setTo("[email protected]")
->setFrom("[email protected]");
$results = $sendMail->execute($inputs)->getResults();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment