1
我的应用程序中有一个VideoClip.mp4存储在我的文档目录中。我可以使用SKPSMTPMessage(电子邮件,主题,正文等)成功发送电子邮件,但我在附加视频时遇到问题。我已经搜寻了很多,但我会继续寻找。如果有人能帮助我,那将非常感激。谢谢!在SKPSMTPMessage中附加视频
此代码(显然)附加的图像,但我一直无法弄清楚如何操纵它附加了视频:
NSString *image_path = [[NSBundle mainBundle] pathForResource:@\"Success\" ofType:@\"png\"];
NSData *image_data = [NSData dataWithContentsOfFile:image_path];
NSDictionary *image_part = [NSDictionary dictionaryWithObjectsAndKeys:
@\"inline;\r\n\tfilename=\\"Success.png\\"\",kSKPSMTPPartContentDispositionKey,
@\"base64\",kSKPSMTPPartContentTransferEncodingKey,
@\"image/png;\r\n\tname=Success.png;\r\n\tx-unix-mode=0666\",kSKPSMTPPartContentTypeKey,
[image_data encodeWrappedBase64ForData],kSKPSMTPPartMessageKey,
nil];