ChangemakerStudios / Papercut-SMTP

Papercut SMTP -- The Simple Desktop Email Server
2.97k stars 272 forks source link

Feature Request: show hyperlink urls #145

Closed ericnewton76 closed 3 years ago

ericnewton76 commented 5 years ago

Is your feature request related to a problem? Please describe. I would love to be able to see the hyperlink url before clicking it.

Describe the solution you'd like

cdroulers commented 5 years ago

This would be a great feature, one of the most frequent action I take in Papercut is trying to open a link in an incognito window, which I can't because it won't let me copy it easily!

woutervs commented 4 years ago

I would also love the "Copy link" feature, is this something that is in de pipeline?

Kind regards.

CrovLune commented 4 years ago

A feature to click on HTML encoded links would be also awesome. because for some reason it shows the link with \&\ signs. which breaks the link and makes it useless.

1Jesper1 commented 3 years ago

@Jaben I would like to create this, do you have any advice for the place of the code and methods to use?

  1. On hover over a hyperlink, show the hyperlink url somewhere. Chrome shows it in the lower left corner of the window. What should be prefered? Set an onmouseover attribute on <a tags on message render? Or use something like this https://social.msdn.microsoft.com/Forums/en-US/6f292ac0-ccbf-4fc1-88a5-e3b9ea8d862a/webbrowser-mouse-events?forum=Vsexpressvcs https://stackoverflow.com/a/3114319/2908623

  2. On rightclick of the hyperlink, a context menu, including "Copy Link Location" for inspection in notepad/etc We don't want to use the default contextmenu? Do we have to create a custom contextmenu/ dropdown?

  3. A feature to click on HTML encoded links would be also awesome. because for some reason it shows the link with &\ signs. which breaks the link and makes it useless. I think we need to use WebUtility.HtmlDecode in the Navigate method?

1Jesper1 commented 3 years ago

@CrovLune What is the specific HTML encoded link?

CrovLune commented 3 years ago

@1Jesper1 I can't find it anymore. It's been a long time. But SMTP sent me not an actual HTML link that could be clicked on in the mail. But rather a link with &amp and other stuff... Which meant that you had to copy the link, edit it manually and then paste it in browser to open it. Which was annoying as hell.

Jaben commented 3 years ago

@Jaben I would like to create this, do you have any advice for the place of the code and methods to use?

1. _On hover over a hyperlink, show the hyperlink url somewhere. Chrome shows it in the lower left corner of the window._
   What should be prefered? Set an onmouseover attribute on <a tags on message render? Or use something like this [social.msdn.microsoft.com/Forums/en-US/6f292ac0-ccbf-4fc1-88a5-e3b9ea8d862a/webbrowser-mouse-events?forum=Vsexpressvcs](https://social.msdn.microsoft.com/Forums/en-US/6f292ac0-ccbf-4fc1-88a5-e3b9ea8d862a/webbrowser-mouse-events?forum=Vsexpressvcs) [stackoverflow.com/a/3114319/2908623](https://stackoverflow.com/a/3114319/2908623)

2. _On rightclick of the hyperlink, a context menu, including "Copy Link Location" for inspection in notepad/etc_
   We don't want to use the default contextmenu? Do we have to create a custom contextmenu/ dropdown?

3. _A feature to click on HTML encoded links would be also awesome. because for some reason it shows the link with &\ signs. which breaks the link and makes it useless._
   I think we need to use _WebUtility.HtmlDecode_ in the Navigate method?

I've switched Papercut to use Edge (WebView2) -- it's currently in branch "NewHTMLRender". The problem is currently handling the installation system with the edge download.

Yeah, I'd like to see a custom menu: go.microsoft.com/fwlink/p/?LinkId=2124703

1Jesper1 commented 3 years ago

@Jaben Good work!

  1. For showing the url in the edge of the screen we could enable IsStatusBarEnabled: coreWeb.Settings.IsStatusBarEnabled = true;
  2. For custom contextmenu we could maybe use this: https://stackoverflow.com/a/62732034/2908623 ? We need to use a Form for a ContextMenuStrip.
  3. I think the HTML encoded links work already.
Jaben commented 3 years ago

@1Jesper1 Choosing option #1 for now. Seems to work fine. Thanks for your help!