通过电子邮件添加标签

I’ve had a request for the ability to add tags to topics when posting by email. This could work by adding a line as follows starting with tags: and then a comma separated list.

tags: tag1, tag2, tag3 

I can see potential for difficulty, e.g. because there is no autocomplete people won’t know tags that are already being used and create duplicates, but I also think it can be quite powerful and help people to indicate organization they’d like without having to log in - and in my community many people just want to stay in their email.

4 个赞

Hi!

We (@mcwumbly and I) would really benefit from a feature like this also. Was anything ever implemented that enables tagging topics that are created via email?

Thanks!

3 个赞

Nope, nothing was implemented regarding tag creations via incoming emails.

Is this pr-welcome material?

It’s quite risky. How do you know what tags exist? What happens if you typo a tag? What happens when a tag is specified that doesn’t exist?

Just ignore all that? No feedback?

2 个赞

I’m with you, Jeff. My opinion has changed since posting this request back in the day. Let’s keep it simple, and let the moderators garden and fix tags etc. If people want to indicate in their message where it should go that’s fine too.

1 个赞

Here are some thoughts to address the risks that you identified:

The feature should respect that tags site settings, including “minimum trust level to create tags” If that is higher than the user’s trust level, then the tag would just get dropped if it doesn’t exist (which could be due to a typo).

If the user’s trust level allows them to create tags, then the new tag would be created (which could be a misspelling).

Yes, the chance of these errors is higher without immediate feedback, but on the other hand, this is a pretty “advanced” feature anyway, so I wouldn’t expect a huge onslaught of tagging mayhem were it to be added.

It’s a pain in the behind to implement properly (allowing for localization and some leniency with format), a feature that is impossible to discover and dealing with edge cases is hard.

That said, I don’t see why not allow the community to send through a well specified PR, cause it is kind of important for mailing list parity.

7 个赞

I have a different suggestion for adding tags by email:

email@forum.com is used for Uncategorized
accessibility@forum.com is also used for Uncategorized but adds the tag Accessibility in Discourse

Has anyone considered this?

1 个赞

Many systems (incl. gmail) allow addresses to have the format user+tag@domain.com, routed to user@domain.com.

我认为 Discourse 已经利用了该功能来按类别路由邮件。

我真的很喜欢这个主意!它使用了与类别和群组相同的工作流程,因此用户不必学习全新的东西。

1 个赞

谢谢,我还可以看到另一种可行的方法:

email+tagname@forum.com 假设该标签可供 everyone 组使用。

有关于此的更新吗?

我们可以通过邮件支持带标签的主题吗?

1 个赞

简而言之:不行。

从最初的“添加以 tags: 开头并后跟逗号分隔的标签列表”到使用 x+tag@forum.example,提出了几项建议。虽然我喜欢第一个,但第二个会破坏现有的群组和类别邮件发送配置,我也理解处理标签错误所带来的困难。

1 个赞

如何利用主题行?

Subject: How to add tags via email ;email,api,webhook

分号右边的所有内容都是标签的 CSV。

它在收件箱里看起来会很奇怪。

这会非常脆弱,而且肯定无法匹配许多将 + 用于匹配组或类别的设置。

@tobiaseigen 的原始提议似乎是最通用的。

可以通过切片列表并仅保留提到的第一个来克服限制。

应该有一些约定(即规范)来忽略 ^tags: 的后续使用(即,优先处理电子邮件开头的标签,并忽略引用,对于我们这些喜欢引用而不是回复的人)。但除此之外,在我看来,该提议似乎很稳妥。

2 个赞