iOS URL Scheme Microsoft Outlook App

iOS URL Scheme Microsoft Outlook App,第1张

概述这似乎是不可能找到的,除非也许没有一个.但是有人知道(如果有)iOS URL方案,用于打开Microsoft Outlook移动应用程序,直接使用预定义的TO_EMAIL,SUBJECT和BODY进行撰写屏幕吗? 这是我发现的一个链接帮助我 IOS Outlook URL Scheme. 从那以后我就能想出这个代码: // Create an array of recipients for the 这似乎是不可能找到的,除非也许没有一个.但是有人知道(如果有)iOS URL方案,用于打开Microsoft Outlook移动应用程序,直接使用预定义的TO_EMAIL,SUBJECT和BODY进行撰写屏幕吗?解决方法 这是我发现的一个链接帮助我 IOS Outlook URL Scheme.

从那以后我就能想出这个代码:

// Create an array of recipIEnts for the email.NSArray* emailRecipIEnts = @[@"example@email.com",@"example2@email.com"];// Create a mutable string to hold all of the recipIEnt email addresses and add the first one.NSMutableString* emailTo = [[NSMutableString alloc] initWithString:emailRecipIEnts[0]];// Loop through all of the email recipIEnts except for the first one.for (int index = 1; index < emailRecipIEnts.count; index++){    // Add a semicolon and then the email address at the current index.    [emailTo appendFormat:@";%@",emailRecipIEnts[index]];}// Get the email subject from the subject text fIEld.Nsstring* emailSubject = fIEldSubject.text;// Encode the string for URL.Nsstring* encodedSubject = [emailSubject stringByAddingPercentEnCodingWithAllowedCharacters:[NSCharacterSet URLHostAllowedCharacterSet]];// Get the email body from the body text fIEld.Nsstring* emailBody = fIEldBody.text;// Encode the string for URL.Nsstring* encodedBody = [emailBody stringByAddingPercentEnCodingWithAllowedCharacters:[NSCharacterSet URLHostAllowedCharacterSet]];// See if the subject or body are empty.if (![emailSubject length] || ![emailBody length]){    // Exit.    return;}// Create a string with the URL scheme and email propertIEs.Nsstring *stringURL = [Nsstring stringWithFormat:@"ms-outlook://compose?to=%@&subject=%@&body=%@",emailTo,encodedSubject,encodedBody];// Convert the string to a URL.NSURL *url = [NSURL URLWithString:stringURL];// Open the app that responds to the URL scheme (should be Outlook).[[UIApplication sharedApplication] openURL:url];

Outlook的URL方案是:ms-outlook:// compose?to=example@email.com\u0026amp; subject = Subject& body = Message

希望这可以帮助!

总结

以上是内存溢出为你收集整理的iOS URL Scheme Microsoft Outlook App全部内容,希望文章能够帮你解决iOS URL Scheme Microsoft Outlook App所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/web/1109634.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-29
下一篇2022-05-29

发表评论

登录后才能评论

评论列表(0条)

    保存