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 trialBridget Word
3,237 PointsMy "mailto:" isn't working...
I know my code is right. Is there some other reason my default email isn't opening? Below is my code.
<a href="mailto:coolvrexperiences@gmail.com">coolvrexperiences@gmail.com</a>
2 Answers
I Dilate
3,983 PointsHey again Bridget,
It looks like your code is good to me, but unfortunately, mailto: is a real pain! Mailto is a really unique feature that's built into HTML, because it relies on the user of your web page having a default email client set up. In the past, often people used software like Microsoft Outlook to send mail (many still do) - and in those cases, clicking on a mailto: link will fire up Outlook and set up a blank message to that email address ready to send.
On an iPhone, a mailto: link will interact with the Mail app - another example of how a default bit of software can be launched.
However - if you don't have a default email client setup, the mailto: link will either fail, and do nothing, or it might throw an error.
In my case, I'm on a Mac, and I use gMail to handle my email - it's a web app, and it doesn't use any kind of software. So I have no default mail app as far as my browser is concerned. When I hit a mailto: link, it does nothing.
In your case, I'm guessing you don't have one setup either. You're on Windows right... well, it's likely you're not an Outlook user, otherwise it would have launched a new email for you.
For now, you can safely assume that your mailto: link is fully functional if you've used the code you pasted above. And you can move on.
Honestly, mailto: is an increasingly rare case of something that's quite an old concept still lingering on in current HTML practice. There aren't too many of those left these days, thankfully.
Good luck, it sounds like you're making some good progress!
Rich
I Dilate
3,983 PointsNo problem Bridget, I hope your lessons have been going well.
Bridget Word
3,237 PointsBridget Word
3,237 PointsThanks again for your help.