iphone - How do you send an image attachment on an ios app with swift using mailgun? -


i able send regular email body text using cocoapod https://cocoapods.org/?q=mailgun there way send image attachment?

according it's sdk (which sadly hasn't been improved swift , has dependency on afnetworking objc):

let message = mgmessage(from:"excited user <someone@sample.org>",                             to:"jay baird <jay.baird@rackspace.com>",                             subject:"mailgun awesome!",                             body:"mailgun great, here picture of cat.")! // someimage: uiimage // type can either .jpegfiletype or .pngfiletype message.add(someimage, withname: "image01", type:.pngfiletype) 


swiftmailgun seems better fit swift it's still in stages (check todo list).


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -