@@ -15,12 +15,13 @@ extension Mailgun {
1515 public let text : String
1616 public let html : String ?
1717 public let attachment : [ File ] ?
18+ public let inline : [ File ] ?
1819
1920 private enum CodingKeys : String , CodingKey {
20- case from, to, replyTo = " h:Reply-To " , cc, bcc, subject, text, html, attachment
21+ case from, to, replyTo = " h:Reply-To " , cc, bcc, subject, text, html, attachment, inline
2122 }
2223
23- public init ( from: String , to: String , replyTo: String ? = nil , cc: String ? = nil , bcc: String ? = nil , subject: String , text: String , html: String ? = nil , attachments: [ File ] ? = nil ) {
24+ public init ( from: String , to: String , replyTo: String ? = nil , cc: String ? = nil , bcc: String ? = nil , subject: String , text: String , html: String ? = nil , attachments: [ File ] ? = nil , inline : [ File ] ? = nil ) {
2425 self . from = from
2526 self . to = to
2627 self . replyTo = replyTo
@@ -30,9 +31,10 @@ extension Mailgun {
3031 self . text = text
3132 self . html = html
3233 self . attachment = attachments
34+ self . inline = inline
3335 }
3436
35- public init ( from: String , to: [ String ] , replyTo: String ? = nil , cc: [ String ] ? = nil , bcc: [ String ] ? = nil , subject: String , text: String , html: String ? = nil , attachments: [ File ] ? = nil ) {
37+ public init ( from: String , to: [ String ] , replyTo: String ? = nil , cc: [ String ] ? = nil , bcc: [ String ] ? = nil , subject: String , text: String , html: String ? = nil , attachments: [ File ] ? = nil , inline : [ File ] ? = nil ) {
3638 self . from = from
3739 self . to = to. joined ( separator: " , " )
3840 self . replyTo = replyTo
@@ -42,9 +44,10 @@ extension Mailgun {
4244 self . text = text
4345 self . html = html
4446 self . attachment = attachments
47+ self . inline = inline
4548 }
4649
47- public init ( from: String , to: [ FullEmail ] , replyTo: String ? = nil , cc: [ FullEmail ] ? = nil , bcc: [ FullEmail ] ? = nil , subject: String , text: String , html: String ? = nil , attachments: [ File ] ? = nil ) {
50+ public init ( from: String , to: [ FullEmail ] , replyTo: String ? = nil , cc: [ FullEmail ] ? = nil , bcc: [ FullEmail ] ? = nil , subject: String , text: String , html: String ? = nil , attachments: [ File ] ? = nil , inline : [ File ] ? = nil ) {
4851 self . from = from
4952 self . to = to. stringArray. joined ( separator: " , " )
5053 self . replyTo = replyTo
@@ -54,6 +57,7 @@ extension Mailgun {
5457 self . text = text
5558 self . html = html
5659 self . attachment = attachments
60+ self . inline = inline
5761 }
5862 }
5963}
0 commit comments