Site texts: unsubscribe links

I’d like to tweak the text around email unsubscribe links in typical notification emails.

Site Texts contains these two entries with the same content:
unsubscribe_link
unsubscribe_link_and_mail

Default text for both is:
To unsubscribe from these emails, [click here](%{unsubscribe_url}).

Obviously one of these appears in the footer of typical notification emails, but which – and where is the other used?

2 Likes

can customize them both I think. :woman_shrugging:t2:

apparently these settings are the ones related

2 Likes

Making the same customization to both the unsubscribe_link and unsubscribe_link_and_mail entries seems like the safest approach.

As Lilly noted, which text string gets used is dependent on the unsubscribe_via_email_footer site setting. Testing it on my local installation, the unsubscribe_link text gets added to the email if the unsubscribe_via_email_footer setting is not enabled. The unsubscribe_link_and_mail text gets added to the email if the unsubscribe_via_email_footer setting is enabled.

The default values of each of the text strings seem to create identical links and lead to identical ways of allowing users to manage their email preferences.

The logic seems to be here: discourse/lib/email/message_builder.rb at 2dae20c05434cdb96f59a996167f77a389169c4d · discourse/discourse · GitHub

Based on the description of the unsubscribe via email footer site setting, I’m guessing that it used to cause a mailto link to be inserted into the email:

Attach an unsubscribe via email mailto: link to the footer of sent emails

That doesn’t seem to be the case anymore though.

2 Likes

Some more context from the ask bot :robot:

https://ask.discourse.com/discourse-ai/ai-bot/shared-ai-conversations/gYtJ3msprWlbS9Suzmpc2w

2 Likes

Very cool, thank you both! I’m sure I’ll make use of the Askbot in the future… I wasn’t aware of its capabilities and hadn’t seen an example before.

I was off studying the transcript @Lilly provided when @Simon posted the conclusion I was coming to: since I have unsubscribe via email footer active, the text for unsubscribe_link_and_mail would be used, but there doesn’t seem to be any downside to changing both texts.

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.