Allow the contact url setting to be an email

(Dannii) #1

We currently are leaving our contact url setting blank, so that the contact email setting is used, which shows our support email address unlinked on the about page. But because we’ve also set up our support email address to be received by one of the forum groups, the new version emails sent to the contact email address are rejected because they’re autogenerated!

If I were to change our contact email address and then put our support email address into the contact url setting, it links it to https://intfiction.org/support@intfiction.org, obviously not what we want!

I can make it produce the correct link by making the contact url setting be mailto:support@intfiction.org, but it both shows the mailto to the user and it linkifies it.

Can the contact url setting be change to support email addresses directly, leaving them unlinked like it would if it were displaying the contact email instead?

0 Likes

(Dannii) #2

PR at UX: Allow the contact url setting to be an email by curiousdannii · Pull Request #7382 · discourse/discourse · GitHub

2 Likes

(Gerhard Schlager) #3

Thanks for the PR. Misusing the contact_url to solve your particular problem doesn’t feel right to me.

Wouldn’t it be easier to whitelist the email address used for sending new version emails? You can use the auto_generated_whitelist site setting for that.

1 Like

(Michael Brown) #4

On the other hand, mailto:alice@example.com is a URL so I think we should ensure it works properly.

0 Likes

(Gerhard Schlager) #5

It works, but it doesn’t look pretty since it includes the mailto: in the link text.

<a href="mailto:alice@example.com" target="_blank">mailto:alice@example.com</a>

@Dannii wanted an email address that can be entered as contact_url and isn’t a link. That’s feels kinda wrong to me.

3 Likes

(Stephen) #6

It’s also useless if you don’t have a locally configured mail client, which is becoming increasingly common.

0 Likes

(Michael Brown) #7

Oh, that’s weird then. I agree on that part - I think we should render it as:

<a href="mailto:alice@example.com" target="_blank">alice@example.com</a>

If we wanted to drastically overengineer things I might add support for markdown so you could do

markdown:alice@example.com

or

markdown:[Alice](mailto:alice@example.com)

Disagree - websites can ask to handle the mailto: scheme on your system:

image

1 Like

(Dannii) #8

That works perfectly, thank you!

I guess I should’ve thought to look for it. Discourse continues to surprise me with how much it just supports out of the box.

3 Likes