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

General Discussion

abdul faiz mohd jayramie eng
PLUS
abdul faiz mohd jayramie eng
Courses Plus Student 4,478 Points

"Send" Botton without launching defult email app. how?

I’m fairly new in learning web design, this is my second month learning. At the moment i have a close relative as a business client for web design... Simple question, yet I’m struggling. When i create a form in the contact page, user click on the "Submit Button" after filling the details, the browser will launch desktop default email app. How do you send the details directly to an email (eg. admin@mycompany.com) instead of launching default email app? and when a potential client click submit, an auto-reply occur.... please help! my deadline is too close for comfort!

7 Answers

Hi Abdul

I may be wrong but I believe a mailto link always opens the default mail app (whatever the user has chosen). I don't think you can control that.

Ryan

abdul faiz mohd jayramie eng
PLUS
abdul faiz mohd jayramie eng
Courses Plus Student 4,478 Points

hmm... example, on the top right corner, there is a "question mark" symbol for help. When user click and fill in the contact forms and message details. In my case, how do you allow the user to click "Submit Message" and mail to directly to company's admin email instead of launching default windows email app?

Jerry Jernej Kelih
Jerry Jernej Kelih
2,698 Points

Abdul: if you are on short with time you can simply install one of the ready made contact forms and that functionality will work out of the box!

I see what you mean now :) That's a Ruby script we've used for that. If you search the web for Ruby or PHP contact form, you should be good to go.

There's no way to just create a submit form out of only html and css. To create a submit form that a user can enter data into and send an email to you directly from a website requires at least php or ruby (from what I've heard). This is a pretty intricate feature to fully understand if you are new to web design and development. PHP get's handled on your servers side of things, so the information given to your website will be handled by your server, therefore saving you the trouble of having it done client-side (having a mail program pop up)

Here is a php example: http://www.freecontactform.com/email_form.php

Joe Hirst
PLUS
Joe Hirst
Courses Plus Student 6,489 Points

Sounds to me like you're using "mailto:" in your HTML

You'll need to create the form in HTML and use a php send function that's called upon when the form is submitted.

I'd be happy to help if you prefer Abdul.

abdul faiz mohd jayramie eng
PLUS
abdul faiz mohd jayramie eng
Courses Plus Student 4,478 Points

hey guys thanks for being truely supportive! i just got started with the PHP lessons today. i hope i could end with a desired result when complecting "Adding a Contact Form" course.