Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

HTML HTML Basics Going Further with HTML Link to Email

Tati Gvozdik
Tati Gvozdik
746 Points

Problem with link to email

I cannot find the problem in my code <p><strong>Email:</strong> <a href="mailto:coolvrexperience@gmail.com?subject=Hi%20There!">coolvrexperience@gmail.com</a></p>

When I try this link nothing happen at all! I use google chrome. I've even tried internet explorer but the same!

Jake Salo
Jake Salo
13,175 Points

Hi Tati,

Your code is valid, and it is working for me. What email client are you using? This is likely the issue here.

Tati Gvozdik
Tati Gvozdik
746 Points

@Jake Salo I use different emails and gmail and mail and other. Maybe I didn't understand the question.

Jake Salo
Jake Salo
13,175 Points

@tatigvozdik Sorry i mean the application you use to view your emails. The 'mailto:' prefix cannot open up an email account simply through the browser, the user clicking the link needs to have some kind of app to open the email with. For example, on windows a lot of people use Microsoft outlook, and on mac the default mail app. Hope this cleared things up for you :)

Tati Gvozdik
Tati Gvozdik
746 Points

@Jake Salo Thank you for your help but I don't have outlook.

Jake Salo
Jake Salo
13,175 Points

@tatigvozdik No problem, that's why it's not working then - you have to have outlook or something equivalent.

3 Answers

Jacob Smith
Jacob Smith
10,926 Points

For those using the Mail Application. I was having the same issue and couldn't figure out why. 1) I opened Mail 2) Selected preferences 3) Selected the General tab 4) Default email reader: Mail *Make sure Mail is selected

Patrik Horváth
Patrik Horváth
11,110 Points

Your problem is simple try click on it on Windows 10, what happend to me ? it opend Mail APP ( windows 10 preinstalled ) so it works

whot i want to say is that you have to have somekind of Mail Client installed on PC like OUTLOOK or etc ... :)

you can also make if someone click on it it bring Modal to your page with Contact FORM for example :) - this is better then mailto option ....

Tati Gvozdik
Tati Gvozdik
746 Points

Thank you! But I don't quite understand you last sentence about Modal...

Patrik Horváth
Patrik Horváth
11,110 Points

simple not 100% of users have Mail app installed on PC so making Contact form after clicking on mail is better way :)

Modal is BOX with Content ( hidden but it will be showed after user ewent )

Tati Gvozdik
Tati Gvozdik
746 Points

@Patrik Horváth Thank you!