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, obviously not what we want!

I can make it produce the correct link by making the contact url setting be, 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?


(Dannii) #2

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


(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, is a URL so I think we should ensure it works properly.


(Gerhard Schlager) #5

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

<a href="" target="_blank"></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.


(Stephen) #6

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


(Michael Brown) #7

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

<a href="" target="_blank"></a>

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



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


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.