Back to the Shapespark home page

How to invoque email (mailto:) with a trigger

Hi @jan, how can I make gmail or outlook or any other mail application open with the command mailto:john@mail.com?
I’ve written it like this

< a href="mailto:john@mail.com?subject=I need more info">

using the HTML or SCRIP extension but it doesn’t work for me! can you tell me which extension to use and how should I write the command?

Try Open URL extension with mailto:john@mail.com as the URL. Keep in mind that how mailto links are opened depends on a user configuration (what browser, system and email program is used) and website author doesn’t have a control over it.

1 Like

Thanks @jan but it doesn’t work for me on all platforms :anguished:, on my computer opens a page with the address mailto:john@mail.com and nothing else, on the cell phone, opens the mail application :smiley:, I’ll have to write something different? or is it something from my computer as you say!

What happens on your computer, from the same browser that you test the trigger, if you open the mailto link from your post above?

On my computer just open a new clean window in chrome (by default) with the same phrase mailto:john@gmail.com and nothing more

When I go and try to open the link on edge browser, send me to Chrome but nothing happens.

If a computer is not configured to open mailto links with an email client, there is nothing a website can do to open the client when such link is clicked. This is why contact emails on websites are often clearly shown so visitors can copy-paste them if mailto link is not working for them.

In Shapespark case, it could be better to use the HTML Label extension to show the email address as a mailto link:

Contact us at <a href="mailto:john@mail.com">john@mail.com</a>.

This way the email is visible and can be copy pasted if mailto is not working.

Thanks @Jan for the insight, I will keep your advice in mind and propose it if the customer mentions problems with this.

@jan How can I change the dark blue color of the words in the mail on the HTLM Label to a lighter and more visible color?

You can change the appearance of the link with inline CSS style for the a element. For example, to display the link as bold blue text without underline use:

<a href="mailto:john@mail.com" style="color:#5cc2e6; font-weight: 700; text-decoration: none">john@mail.com</a>

1 Like