Make Button perform an html, not a link

I want to make certain buttons run an html code which generates an email in their email program with the subject matter already inserted, ready to send to me. I have this HTML code. How do I make a button run this code? TIA

Do you mean a mailto link?

<a href="mailto:me@example.com?subject=My%20Subject">Email me</a>

if so, then you can set the button link simply like this, replacing any spaces with %20

Word of warning though. Trawling robots will be able to see that raw email address and collect it. That data will very likely be sold and spammed.

2 Likes

Appreciate the warning. I won’t do it. I need a safe way for someone to click on an artwork and have it generate an email to me with that specific artwork in the email header…. I’m not a coder (which is why I used RapidWeaver Classic since 2008)

Reese Schroeder
Artist

Rancho Mirage, CA

liquidoranges STUDIO

Visual Metaphors

Instagram: @reese_schroeder_artist

All information contained within this electronic email correspondence, including data, attachments, images, ideas are protected by national and international intellectual property right and copyright laws © Reese Schroeder and liquidoranges STUDIO, ALL RIGHTS RESERVED.

This would require a custom component with server-side PHP to handle the emailing, so your email address is never exposed in the page source.

The component would take the artwork URL (and optionally artwork name, subject, or other details) in hidden form fields, and display a button like “Email me details of this artwork” positioned below the artwork.

When the button is clicked, the visitor enters their email address and submits the form. The data is sent to a server-side PHP script where your email address lives securely, and an email is sent to you containing the artwork details and the visitor’s contact info.

I could provide a quote for creating such a component if you’d like to contact me via my website. (click my avatar for the url).

1 Like