There are currently two ways to send emails in iOS. You can use openURL to open the iOS email app and use MFMailComposeViewController to bring up the email interface in the app to send emails. There are a lot of introductions to the two search methods. The third method is described below. The Open Source library SKPSMTPMessage is used to send emails. In fact, this method has also been introduced in many articles, but I have read some articles and write almost all of them. They all paste the code in the demo, and there is no function I need to send images and video attachments. I have studied and consulted some materials, integrated the code, and pasted it to make it easier for myself and anyone who needs it. [Cpp] NSUserDefaults * defaults = [NSUserDefaults standardUserDefaults]; SKPSMTPMessage * testMsg = [[SKPSMTPMessage alloc] init]; testMsg. fromEmail = [defaults objectForKey: @ "fromEmail"]; testMsg. toEmail = [defaults objectForKey: @ "toEmail"]; testMsg. bccEmail = [defaults objectForKey: @ "bccEmal"]; testMsg. relayHost = [defaults objectForKey: @ "relayHost"]; testMsg. requiresAuth = [[defaults objectForKey: @ "RequiresAuth"] boolValue]; if (testMsg. requiresAuth) {testMsg. login = [defaults objectForKey: @ "login"]; testMsg. pass = [defaults objectForKey: @ "pass"];} testMsg. wantsSecure = [[defaults objectForKey: @ "wantsSecure"] boolValue]; // smtp.gmail.com doesn't work without TLS! TestMsg. subject = @ "SMTPMessage Test Message"; // testMsg. bccEmail = @ "testbcc@test.com"; // Only do this for self-signed certs! // TestMsg. validateSSLChain = NO; testMsg. delegate = self; // text information NSDictionary * plainPart = [NSDictionary dictionaryWithObjectsAndKeys: @ "text/plain", kSKPSMTPPartContentTypeKey, @ "This is a t é st mess limit ge. ", kSKPSMTPPartMessageKey, @" 8bit ", kSKPSMTPPartContentTransferEncodingKey, nil]; // contact information NSString * vcfPath = [[NSBundle mainBundle] pathForResource: @" test "ofType: @ "vcf"]; NSData * vcfData = [NSData dat AWithContentsOfFile: vcfPath]; NSDictionary * vcfPart = [NSDictionary dictionaryWithObjectsAndKeys: @ "text/directory; \ r \ n \ tx-unix-mode = 0644; \ r \ n \ tname = \ "test. vcf \ "", kSKPSMTPPartContentTypeKey, @ "attachment; \ r \ n \ tfilename = \" test. vcf \ "", kSKPSMTPPartContentDispositionKey, [vcfData encodeBase64ForData], kSKPSMTPPartMessageKey, @ "base64", signature, nil]; // image and video attachment // attach image N SString * imgPath = [[NSBundle mainBundle] pathForResource: @ "test" ofType: @ "jpg"]; NSData * imgData = [NSData dataWithContentsOfFile: imgPath]; NSDictionary * imagePart = [NSDictionary dictionaryWithObjectsAndKeys: @ "image/jpg; \ r \ n \ tx-unix-mode = 0644; \ r \ n \ tname = \ "test.jpg \" ", kSKPSMTPPartContentTypeKey, @" attachment; \ r \ n \ tfilename = \ "test.jpg \" ", region, [imgData encodeBase64ForDa Ta], kSKPSMTPPartMessageKey, @ "base64", delimiter, nil]; // attach video NSString * videoPath = [[NSBundle mainBundle] pathForResource: @ "video" ofType: @ "mov"]; NSData * videoData = [NSData dataWithContentsOfFile: videoPath]; NSDictionary * videoPart = [NSDictionary dictionaryWithObjectsAndKeys: @ "video/quicktime; \ r \ n \ tx-unix-mode = 0644; \ r \ n \ tname = \ "video. mov \ "", kSKPSMTPPartConte NtTypeKey, @ "attachment; \ r \ n \ tfilename = \" video. mov \ "", kSKPSMTPPartContentDispositionKey, [videoData encodeBase64ForData], kSKPSMTPPartMessageKey, @ "base64", kSKPSMTPPartContentTransferEncodingKey, nil]; testMsg. parts = [NSArray arrayWithObjects: plainPart, vcfPart, imagePart, videoPart, nil]; [testMsg send]; the Code is modified based on the Demo. After testing, an email with attachments can be sent normally.