Jump to content

NOT WORKING mail to form IN HTML


anupamsworld

Recommended Posts

I tryed to make a mail to form by xhtml code but after creating the form(in fire fox) when i am clicking the send button i am being redirecting to google page with google chrome. please reply how to make this mail to form (by which user can send me mail from website).

with this also mtell me how to do it by html .

thank you.

Link to comment
Share on other sites

Hi Anupam,

You can use the below code and it will automatically load up the default mail service provider that the user has set up, whether it be gmail or a desktop application such as Windows Mail or Microsoft Outlook.

<form action="mailto: someone@yourdomain.com" method="POST" enctype="text/plain"><input type="text" name="name"><input type="email" name="email"><input type="submit" value="Submit"></form>

The above form uses the mailto protocol installed into most browsers, so it will set up email contents and it will load up the email application, and then the user will have to click send.

It will come out like this

name=Value

email=Value

 

and the 'to' email address will be the one that you place after the mailto: protocol in the form action.

 

If you wanted to change this so that the user doesn't have to click send in their email provider, Niche had the right solution to use PHP mail so that it sends it from any email address you like.

 

If you need help on that, let us know by replying.

 

Hope this helps.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...