Jump to content

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.

Share this post

Link to post
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




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.

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...