From 0516836041c872e0500eafa5c56251a252f7e64c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jir=CC=8Ci=CC=81=20Zdvomka?= Date: Mon, 29 Jun 2020 12:37:19 +0200 Subject: [PATCH] make email content field optional --- Sources/SendGridKit/Models/SendGridEmail.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Sources/SendGridKit/Models/SendGridEmail.swift b/Sources/SendGridKit/Models/SendGridEmail.swift index dd8be65..52f32db 100644 --- a/Sources/SendGridKit/Models/SendGridEmail.swift +++ b/Sources/SendGridKit/Models/SendGridEmail.swift @@ -13,7 +13,7 @@ public struct SendGridEmail: Encodable { public var subject: String? /// An array in which you may specify the content of your email. - public var content: [[String: String]] + public var content: [[String: String]]? /// An array of objects in which you can specify any attachments you want to include. public var attachments: [EmailAttachment]? @@ -55,7 +55,7 @@ public struct SendGridEmail: Encodable { from: EmailAddress? = nil, replyTo: EmailAddress? = nil, subject: String? = nil, - content: [[String: String]], + content: [[String: String]]? = nil, attachments: [EmailAttachment]? = nil, templateId: String? = nil, sections: [String: String]? = nil,