Email Image

Permalink
Hi -

Can anyone tell me how to add an image/button to my website that when clicked would allow a user to email me by opening their email program with my address already installed?

I know the:

<a href="mailto:me@mysite.com">Send an Email</a>

thing...I just can't figure out how to apply it to an image.

Thanks for your help!
Michelle (NEWBIE)

 
cmscss replied on at Permalink Reply
Hi There,

Do you know how to place an image into the content block or are you doing this in a template?

Either way, you want to end up with your <a> tags wrapping your image - essentially replacing your "Send an Email" text with an image like this:
<a href="mailto:me@mysite.com><img src="/path/to/your-image.jpg" /></a>


If you're doing this via the content editor, then:
- Place an image using the image icon
- Then click on your image and click the link icon
- And under "Link url" (the first box) enter: "mailto:me@mysite.com"

Save it and your image should be wrapped by your mailto <a> tags and will look like the code example above.

You can also populate the subject line of the email (amongst other things) by adding ?subject="" at the end of the mailto like this:
<a href="mailto:me@mysite.com?subject=Your subject line">


Hope that helps
globalnerds replied on at Permalink Reply
globalnerds
<a href="mailto:email@myemail.com"><img src="http://www.mysite.com/full-image-path/my-image.jpg" width="600" height="300" alt="My At Text" /></a>


However, I would suggest using a contact form instead. The reasons:

Not everyone has outlook or similar program, it will try to open the link and it won't work
You don't want your email address on your site, this will increase the likelihood of getting spam.

If you want to use an image that will allow them to click to your contact page, that can be done as well.

<a href="http://www.mysite.com/contact-page"><img src="http://www.mysite.com/full-image-path/my-image.jpg" width="600" height="300" alt="My Alt Text" /></a>


Note that the width and height need to correspond to the width and height of the image you are using.
globalnerds replied on at Permalink Reply
globalnerds
There is a free add on that gets installed when you install concrete5. It is called "Form"