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];