Opening up this old thread again, I was wondering if anyone knows how to use Jason’s iOSKit for sending attachments to the email in iOS?
In Jason’s code below you can send an email message, but I don’t see anything in the example to add an attachment.
[code]mailComposeView = new Extensions.MFMailComposeViewController
mailComposeView.setToRecipients Array(“email@example.com”)
mailComposeView.setCcRecipients Array(“email@example.com”)
mailComposeView.setBccRecipients Array(“email@example.com”)
mailComposeView.setSubject “This is a sample email”
if Extensions.MFMailComposeViewController.canSendMail then
mailComposeView.PresentInView(self)
end if[/code]
I see the method addAttachment, but I don’t know how to implement it.
declare sub addAttachment_ lib MessageUIKitLib selector "addAttachmentData:mimeType:fileName:" _
(obj_id as ptr, data as ptr, MIMEType as CFStringRef, fileName as CFStringRef)
addAttachment_(self,NSDataFromFolderitem(attachment), MIMEType, fileName
)
The name of my file is Roster.sqlite. I was wondering if anyone knows how I can add the functionality to be able to send the database file with Jason’s mailComposeView code above.