如何为 ms-outlook://compose body 参数为 Outlook for iOS 配置 HTML 正文 [英] How to Configure HTML body for ms-outlook://compose body parameter for Outlook for iOS

查看:30
本文介绍了如何为 ms-outlook://compose body 参数为 Outlook for iOS 配置 HTML 正文的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新 - 2/26/2020我们的一位客户刚刚从 Microsoft 那里得到了这个:

UPDATE - 2/26/2020 One of our clients just got this back from Microsoft:

感谢您将此问题提交给 Outlook for iOS 和 Android 团队.经过仔细考虑,产品团队仍然决定在 Outlook Mobile 深层链接中禁用 HTML.虽然之前允许使用深层链接中的 HTML,但从未正式设计或引入对这种情况的支持.此外,在深层链接中支持 HTML 可能会带来意想不到的后果和潜在的安全问题.

Thank you for submitting this issue to the Outlook for iOS and Android team. After careful consideration, the product team is maintaining it's decision to disable HTML within Outlook Mobile deeplinks. While HTML within deeplinks was previously allowed, support for this scenario was never formally designed or introduced. Additionally, supporting HTML within deeplinks can introduce unintended consequences and potential security issues.

虽然不受官方支持,但使用纯文本的深层链接将继续在 Outlook for iOS 和 Android 中工作.请注意,此行为可能会随时修改,恕不另行通知.

Though not officially supported, deeplinks that utilize plain-text will continue to work in Outlook for iOS and Android. Please note that this behavior may be modified at any time without notice.

使用 UIActivityViewController 共享您的 HTML 正文也不再有效.微软似乎剥夺了我们在其系统中撰写电子邮件时生成任何 HTML 正文的能力.

Using the UIActivityViewController to share your HTML body also no longer works. It would appear that Microsoft has taken away our ability to generate any HTML bodies when composing an email in their system.

更新 - 2/6/2020正如回复所示,它再次从固定变为损坏.我们的一个专门使用 Outlook 的大型自定义应用程序客户一直在寻求与 MS 的票,本周终于得到回应,多家公司已报告此问题,他们正在研究一种安全地允许共享 HTML 正文的方法.在 iOS 应用程序的过渡期间,我们一直在转换我们的代码以使用 UIActivityViewController 并排除几乎所有的 activityTypes.这允许您设置 HTML 正文:

UPDATE - 2/6/2020 As responses show, it's gone from fixed to broken again. One of our large custom app clients that uses outlook exclusively has been pursuing a ticket with MS and this week finally got a response that multiple companies have reported on this issue and they are looking into a way to securely allow sharing of HTML bodies. In the interim for iOS apps we've been converting our code to use the UIActivityViewController and excluding almost all the activityTypes. This allows you to set the HTML body:

let items = [["Body" : emailBody]]

let acv = UIActivityViewController(activityItems: items, 
                           applicationActivities: nil)

这种方法的两个问题是a) 如果您尝试设置主题或收件人,这些将被忽略.我尝试了多种不同的方法,但都没有成功.因此,在我们的应用程序中,出于报告目的,我们在发送电子邮件之前收集了联系信息,用户需要再次在 Outlook 邮件编辑器中输入联系信息.b) 它增加了一个额外的步骤,要求用户从初始 UIActivityViewController 中选择 Outlook 作为共享项目.我们不得不处理报告的错误",这些错误"不是错误,只是用户没有选择 Outlook.

The two issues with this approach, is a) If you try and set the subject or recipients, those are ignored. I've tried multiple different ways with no success. So in the case of our apps where for reporting purposes we collect the contact info before the email is sent, the user is required to again enter the contact info in the Outlook message composer. b) It adds an extra step of requiring the user to select Outlook as the share item from the Initial UIActivityViewController. We've had to deal with reported "bugs" that are not bugs, just users not selecting Outlook.

更新 - 12/12/2019由于我的 Outlook 版本仍然是 4.15.0,Microsoft 似乎已解决了该问题,但是当今天要求为我提交的票证进行屏幕截图时,链接现在再次正确编码.请投票关闭.

UPDATE - 12/12/2019 The issue appears to have been fixed by Microsoft as my Outlook version remains 4.15.0 but when asked today to make screens shots for a ticket I submitted, the links are now being encoded correctly again. Please vote to close.

原始问题/问题

我之前使用的是基于这篇文章的说明.但似乎在 Outlook for iOS 版本 4.14.x 及更高版本(Outlook 版本在这篇文章 4.15.0 之前测试过)中,编码的 HTML 正文被剥离了所有编码字符.也就是说,类似于:

I was previously using instructions based on this post. But it appears that with Outlook for iOS version 4.14.x and up (Outlook version tested as of this post 4.15.0) the encoded HTML body is being stripped of all of its encoded characters. Which is to say that something like:

<br>
<a href="www.somelink.com">Some Link</a>
<br>

成为

braref=www.somelink.comSomeLink/abr

希望 iOS Outlook 团队的某个人看到这篇文章,也许可以提供一些指导,说明如何配置 HTML 正文以通过 ms-outlook://compose body 参数.或者如果其他人已经弄清楚了.请回复.谢谢!

Hoping someone from the iOS Outlook team sees this post and can perhaps provide some guidance on how one might configure an HTML body to be passed through the ms-outlook://compose body parameter. Or if anyone else has figured it out. Please respond. Thanks!

推荐答案

在 v4.19.0(最新版本)中,小于"和大于"符号 (<>) 回来了,但 html 正文没有呈现,所以电子邮件看起来像这样:

In v4.19.0 (latest version) "less than" and "greater than" signs (< >) are back but the html body is not rendered, so emails looks like this:

,你好吗

这篇关于如何为 ms-outlook://compose body 参数为 Outlook for iOS 配置 HTML 正文的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆