Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

HTML

Mitchell Smit
Mitchell Smit
9,219 Points

HTML Contact-form

Hello Guys,

I have a question, does anyone know how to send information from a contact form directly to my e-mail? Is this even possible because right now i don't even know where to store this type of information.

Thanks,

Mitch

Kingsley Felix
Kingsley Felix
8,591 Points

yes i think, you will have to use mailto: somewhere with the opening form tag.

2 Answers

Steven Parker
Steven Parker
215,939 Points

You can't send email directly using a form, but the form can submit data to the server and then the server can send the email. Setting that up depends on the server. For example, Wordpress sites have a standard contact form you can include in your site and a configuration menu where you put your email address.

Another approach is to use a "mailto:" in the form's action, but that may not work depending on the user's mail agent and/or browser. At best it will open the user's mailer and fill in the info but the user will still have to select "send" to generate the email.

Mitchell Smit
Mitchell Smit
9,219 Points

Thanks, i think its time for a couple more treehouse courses hahahaha