Skip to content

Instantly share code, notes, and snippets.

@heitortsergent
Created July 31, 2014 00:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save heitortsergent/cc65199b390f8b3c4388 to your computer and use it in GitHub Desktop.
Save heitortsergent/cc65199b390f8b3c4388 to your computer and use it in GitHub Desktop.
SendGrid Objective-C Library Import
#import <SendGrid/SendGrid.h>
#import <SendGrid/SendGridEmail.h>
SendGrid *sendgrid = [SendGrid apiUser:@"username" apiKey:@"password"];
SendGridEmail *email = [[SendGridEmail alloc] init];
email.to = @"example@example.com";
email.from = @"other@example.com";
email.subject = @"Hello World";
email.html = @"<h1>My first email through SendGrid</h1>";
email.text = @"My first email through SendGrid";
[sendgrid sendWithWeb:email];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment