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

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

问题描述

更新-2020年2月26日 我们的一位客户刚刚从Microsoft处获得了此款项:

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

感谢您将此问题提交给iOS和Android版Outlook.经过仔细考虑,产品团队将维持在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.

尽管没有得到官方的支持,但利用纯文本的深层链接将继续在iOS和Android的Outlook中运行.请注意,此行为可以随时更改,恕不另行通知.

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.

更新-2020年2月6日 如响应所示,它已从固定变为损坏.我们的一个专门使用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.

原始问题/问题

我以前使用的是基于这篇文章的说明.但是看来,对于iOS版本4.14.x和更高版本的Outlook(在此版本4.15.0之后已测试Outlook版本),已删除所有已编码字符的已编码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:

<html><body><p><strong>Hi</strong>, how are you</p></body></html>

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

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