Bug: changing the email subject for some templates is ignored

AI-generated summary

Users reported a bug where customizing the email subject for the “User Posted PM” template is ignored, defaulting to %{topic_title} instead of %{username} as intended. The issue persists across multiple templates, with only the digest email subject being editable. Additionally, the hardcoded “To unsubscribe from these emails, click here” footer cannot be removed via templates, causing accidental clicks and user frustration — especially in private forums where subscription is mandatory. Mittineague advised legal caution regarding unsubscribe links, citing CAN-SPAM compliance, though nordize clarified their forum is private and mandatory. hnaseri confirmed the bug remains unfixed. codinghorror noted ongoing email theming improvements by @neil and @awesomerobot that may resolve this. neil confirmed the subject line bug is now fixed via commit 34f564a, allowing customized subjects for topic/reply notifications. Regarding the unsubscribe text, neil explained it’s not template-based but configurable in admin settings — users can edit or remove the “unsubscribe_link” text there, though the link itself remains universally added for compliance.

I changed the subject for the “User Posted PM” email template to [%{email_prefix}] [PM] %{username} sent you a private message but it is ignored and is still using [%{email_prefix}] [PM] %{topic_title}

Using 1.8.0.beta9. Editing other email template subject lines seems to work, this one is ignored.

Also, the line To unsubscribe from these emails, click here. is always added at the end of the message, regardless of what I put in the template body. Can we fix that too and allow us to change it (or even remove it)?

1 лайк

I strongly recommend that you consult a lawyer before you attempt to remove an “unsubscribe”

And you still must include information on how to opt out of receiving future email and honor opt-out requests promptly

As for username vs. topic_title that very well could be a bug if you are certain you are editing the correct template.

I was afraid someone would pick on that aspect :slight_smile: … it’s private company forum where everyone is actually obliged to be signed-up and participate.

4 лайка

I also report that this bug happens and its not fixed. I am trying to remove prefix from the subject of emailed PM and I used %{topic_title} as the subject. However its not changed. I can see that many other email templates are the same.

I also tried text customization section and it didn’t change the subject. I think I was only able to change digest email subject.

Есть ли какие-то новости по этому вопросу?

В частности, можно ли убрать строку «Чтобы отписаться от этих писем, нажмите здесь», вместо того чтобы она была зашита в код?

Некоторые из нас по ошибке нажимают на эту ссылку «нажмите здесь», так как она слишком похожа на письма с других форумов, где есть ссылка «чтобы просмотреть соответствующее сообщение онлайн, нажмите здесь» (или что-то подобное), поэтому люди кликают по инерции. В моём случае это особенно раздражает, так как это приватный форум, где участники обязаны оставаться подписанными.

2 лайка

@neil и @awesomerobot работают над обновлением нашей поддержки по электронной почте для улучшения темизации, поэтому это, возможно, будет решено в рамках этой работы.

2 лайка

Понял, значит, на данный момент для этого требуется вмешательство в код.

Пожалуйста, включите текст «для отписки нажмите здесь» в шаблон, а не в код :slight_smile:

2 лайка

Я исправил это сегодня (FIX: customized email subjects was ignored for some notifications · discourse/discourse@34f564a · GitHub). С этим исправлением будут использоваться кастомизированные темы писем для уведомлений о темах и ответах.

Вы можете настроить текст «unsubscribe_link» из панели администратора, чтобы убрать ссылку. Она добавляется повсеместно, поэтому не является частью шаблонов.

5 лайков

Эта тема была автоматически закрыта через 26 часов. Новые ответы больше не принимаются.