Open GoogleCodeExporter opened 8 years ago
may be text/directory replacing image/png
Original comment by LeshikM...@gmail.com
on 22 Apr 2009 at 3:53
So, this works for me (with the image/png change) on the simulator, but it
fails on
the device.
Any suggestions? Has anyone gotten image (or audio, my real need) attachments
to work?
Thanks
Ryan
Original comment by ryan.stu...@gmail.com
on 16 Aug 2009 at 8:58
Any luck?
If so, please email me at: noam.habot@gmail.com
Thanks!
Original comment by noam.ha...@gmail.com
on 19 Aug 2009 at 5:09
Try this for inline pictures.
NSString *image_path = [[NSBundle mainBundle] pathForResource:@"Icon"
ofType:@"png"];
NSData *image_data = [NSData dataWithContentsOfFile:image_path];
NSDictionary *image_part = [NSDictionary dictionaryWithObjectsAndKeys:
@"inline;\r\n\tfilename=\"Icon.png\"",kSKPSMTPPartContentDispositionKey,
@"base64",kSKPSMTPPartContentTransferEncodingKey,
@"image/png;\r\n\tname=Icon.png;\r\n\tx-unix-
mode=0666",kSKPSMTPPartContentTypeKey,
[image_data encodeWrappedBase64ForData],kSKPSMTPPartMessageKey,
nil];
testMsg.parts = [NSArray arrayWithObjects:plainPart,image_part,nil];
[testMsg send];
Original comment by bull...@gmail.com
on 11 Sep 2009 at 3:17
Thanks bullale@gmail.com, this worked for me.
Original comment by cbinge...@googlemail.com
on 16 Nov 2012 at 10:52
[deleted comment]
@bullale@gmail.com It's wokring fine on simulator, but doesn't work on device.
Original comment by dinutest...@gmail.com
on 16 Aug 2013 at 5:55
Original issue reported on code.google.com by
ahr.srivaths
on 21 Apr 2009 at 11:08Attachments: