From 14c84731560870d2d62ef035a7d25f063002650e Mon Sep 17 00:00:00 2001 From: lfarah Date: Tue, 6 Jan 2015 22:55:53 -0800 Subject: [PATCH] Updated with swift methods --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index c02183c..c01a965 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ email.text = @"My first email through SendGrid"; [sendgrid sendWithWeb:email]; ``` + ## Installation Choose your installation method - CocoaPods (recommended) or source. @@ -97,6 +98,18 @@ Send it. ```objective-c [sendgrid sendWithWeb:email]; ``` +#### Swift +```swift +let sendgrid:SendGrid = SendGrid(apiUser: "username", apiKey: "password") +let email:SendGridEmail = SendGridEmail() +email.to = "example@example.com"; +email.from = "other@example.com"; +email.subject = "Hello World"; +email.html = "

My first email through SendGrid

"; +email.text = "My first email through SendGrid"; + +sendgrid.sendWithWeb(email) +``` ### To