电子邮件地址中的“加号"将转换为Outlook中的空格

编程入门 行业动态 更新时间:2024-10-11 05:22:07
本文介绍了电子邮件地址中的“加号"将转换为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被转换为event yi76iq@domain.

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 was converted to event yi76iq@domain.

因此,我在准备日历事件的.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.我在 Google日历和 Outlook 中都对此进行了测试,并且有效.

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

更多推荐

电子邮件地址中的“加号"将转换为Outlook中的空格

本文发布于:2023-07-14 20:08:05,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1106720.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:加号   空格   转换为   电子邮件地址   quot

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!