电子邮件地址中的“加号"将转换为Outlook中的空格 [英] The 'plus' sign in the email address is converted to space in outlook

查看:256
本文介绍了电子邮件地址中的“加号"将转换为Outlook中的空格的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在处理的应用程序会自动发送包含ICS文件的电子邮件以进行会议邀请.这些电子邮件的回复地址中带有+签名.

The application I am working on sends automatic emails with ICS files for meeting invites. These emails have a reply-to address with a + sign in it.

这在Google日历和gmail中可以正常工作,但是在Outlook中被替换为space.直到大约一个月前,这在前景方面也很好.

This works fine in google calendar and gmail, but gets replaced by a space in outlook. This was working fine in outlook also until about a month ago.

如何指示Outlook不要将其解释为? 以下是一些相关的屏幕截图:

How do I instruct outlook not to interpret it as a ? Following are some relevant screenshots:

推荐答案

有一些反复试验,我发现只有在电子邮件中有.ics文件并且Outlook正在解码组织者的电子邮件地址由于某种原因.因此,event+yi76iq@domain.com被转换为event yi76iq@domain.com.

With a few trial-and-errors, I found out that this happens only when there is an .ics file in the email and that outlook was decoding the organizer's email address for some reason. So, event+yi76iq@domain.com was converted to event yi76iq@domain.com.

因此,我在准备日历事件的.ics时对电子邮件地址进行了编码.这是代码段-(我在这里使用django,并且已经使用urlencode来编码电子邮件地址).

So, I encoded the email address while preparing the .ics for the calendar event. Here is a snippet of the code - (I am using django here and I have used urlencode to encode the email address).

from django.utils.http import urlquote
.
.
organizer = vCalAddress(u"mailto:{}".format(urlquote(communication_sending_email))) #<-- This is the only difference. I have encoded the email address.
organizer.params['cn'] = vText(organizer_full_name)
event.add('organizer', organizer)
cal = Calendar()
cal.add_component(event)

.ics文件中的结果为event%2Byi76iq%40domain.com.我在 Google日历 Outlook 中都对此进行了测试,并且有效.

The result in the .ics file is event%2Byi76iq%40domain.com. I tested this in both Google calendar and Outlook and it worked.

这篇关于电子邮件地址中的“加号"将转换为Outlook中的空格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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