I\'ve recently incorporated MailCore2 into my Objective-C project, and it has worked perfectly. Now, I am in the process of transitioning the code within the app to Swift. I
To send an image as attachment in swift just add:
var dataImage: NSData? dataImage = UIImageJPEGRepresentation(image, 0.6)! var attachment = MCOAttachment() attachment.mimeType = "image/jpg" attachment.filename = "image.jpg" attachment.data = dataImage builder.addAttachment(attachment)