How Do I Open a Web Link in Apple Mail?

Is there any way to click on a link in a Mac (Apple) Mail email, and even better to open link in Chrome or Safari behind mail

for example, with UI Browser I determined that the link is called View the Web version (also the name of the link).

thanks in advance for your time and help

I hope you don't mind that I have revised your topic title to better reflect the question you have asked.

FROM:
Is there any way to click on a link in a Mac (Apple) Mail email, and even better to open link in Chrome or Safari behind mail

TO:
How Do I Open a Web Link in Apple Mail?

This will greatly help you attract more experienced users to help solve your problem, and will help future readers find your question, and the solution.

1 Like

thank you. Yes very appropriate and helpful.

Yes. I do this now with Outlook email.
I find the web link of interest by using RegEx of the email HTML content, and get the href from the anchor (<a>) tag.

In my case, I am looking for some very specific, almost always unique, text/HTML in the HTML, like:

<div and more><a href="https://www.somewebsite.ext/the-web-page.html">Read More</a></div>

Do you have something like that?
What is your criteria?

Please post a real-world example.

Rest In Peace JMichaelTX...you are missed here every day.

I need help with this specific issue. I want to have a macro which clicks on a link in an outlook email where the name of the link contains the word "unsubscribe"

I can get the body of the email to clipboard, but I need the command which says:

  • parse the content of the clipboard
  • when you see an html link, see if it has the word unsubscribe in the "title" of the link
  • if yes, click the link

Example:

This is the text of the email in plain text vs HTML:

You can update your preferences or unsubscribe from this list.

I need the macro to open the url: Mimecast TTP Web Portal

The usual way to do this is to get the HTML content of the message, which will be easier to parse than what's on the clipboard. Your actual regex will vary depending on the HTML content, but this example works for me and should get you started (someone else may have a better expression in their pocket...). Run it with the email concerned frontmost. As written it will pop up a text box so you can compare what you get to what you see when you mouse-over the link -- once you're happy you can change that action for an "Open URL".

Outlook Unsub.kmmacros (3.2 KB)