iphone email attachment

后端 未结 4 1258
醉酒成梦
醉酒成梦 2020-12-03 04:06

I used the MessageUI framework to send the mail with attachment from my application. But i got the following error,

2009-09-07 19:52:23.483         


        
4条回答
  •  -上瘾入骨i
    2020-12-03 04:46

    use this for attach image in a mail, tested in ios 4,5,6

        MFMailComposeViewController *mailer = [[MFMailComposeViewController alloc] init];
        UIImage *myImage = [UIImage imageNamed:@"image.png"];
        NSData *imageData = UIImagePNGRepresentation(myImage);
        [mailer addAttachmentData:imageData mimeType:@"image/png" fileName:@"image"];
    

提交回复
热议问题