How to avoid the mailto annoyance?
Asked Answered
N

6

4

I am working on a website and would like for my users to be able to give feedback as easily as possible. I know one way but I've always hated it:

<a href="mailto:[email protected]">Click Here to be annoyed!</a>

Is there a way in JavaScript or HTML to allow my users to email me without having to go through a lot of trouble?

Nakasuji answered 21/5, 2009 at 2:16 Comment(3)
Maybe I'm not getting it, but what exactly is the "trouble" with clicking on a link?Ulaulah
Perhaps all the default mail client stuffParfitt
@lothar: If one doesn't have one's email client setup (ie. Outlook Express, which is the Windows XP default) then one must log into one's email account, copy the email from the link, and then send the email.Nakasuji
E
15

A CONTACT FORM:

  • avoids spam bots that pick up 'mailtos'
  • allows you to validate that the form user is 'human' (optional captcha)
  • gives you total server-side control over data format
  • allows you to change your email easily from the server, anytime
  • hides your favorite, real email from your visitors/members/site users
  • gives you the option to control the topic (via select menu, etc.)
  • gives you an opportunity to have the user check off something extra
    • e.g., a survey question, subscription opt-in, interest in services, quote, etc.
  • gives you an opportunity to return a thank you (or sales page) after submission
  • gives you another opportunity to look professional

There's no question the link is the easiest initially-- a simple click; but, all things considered, I whole-heartedly agree that a contact form is the way to go for most purposes, for the reasons I listed above, and more.


Well, since Tom challenged me, ;) Here are a few copy-and-paste contact widgets that you can have up and tested in a minute or so.

Some Customizable Flash Contact/MailTo Widgets:

Epitasis answered 21/5, 2009 at 6:44 Comment(3)
You don't actually answer the "How?" questionParfitt
Hi Tom. Thanks for the comment. Well, I was saying that a contact form IS the 'how' (in other words the approach), and stated why. But I did not go into detail about how to create a contact form and have it mail you. Should I? Obviously, I'm new, and am open to tips. Thanks.Epitasis
I agree with all of your technical points, but I know I personally hate using Contact forms..I just feel like I don't have the control/history as if I'm initiating the email and know the destination address. An option to CC it to me would probably go a long way toward helping that.Huehuebner
P
8

The way you describe is the easiest way in my opinion.

If you want the email typed up there in the page like a form, you might want to create an email/suggestion form or alternative.

Parfitt answered 21/5, 2009 at 2:19 Comment(0)
C
4

You can provide a multiline text box for comments and a submit button, POST the text to your server, and then mail it to yourself on the server. That spares your users a trip to their mail clients, at the cost of depriving you of a reasonably-likely-valid reply-to address.

You could even use AJAX and spare them a screen refresh.

Cutback answered 21/5, 2009 at 2:21 Comment(1)
If you are going to do a contact form (in whatever language), then please ensure it can't be abused to send spam. Find a good, security-oriented tutorial on how to defend against that.Manhole
D
4

Google Docs supplies creating webforms that can be easily embedded in websites. It collects all data in an on-line spreadsheet which you can download at anytime in various formats. You can even set e-mail notification if a visitor filled out your contact form.

Dogged answered 23/5, 2009 at 10:19 Comment(0)
C
2

I would create a form that users can provide feedback in, and then have your server write this into a database. Writing to a DB is likely going to make it more efficient for you to wade through feedback. Having users fill a form instead of sending you free-form email also help you enforce some kind of structure on the feedback or the metadata associated with the feedback (bug/feature request/comments, etc).

Crocked answered 21/5, 2009 at 2:59 Comment(0)
M
-1

The most reliable way would be to send the email with the help of some server side processing.

You can also do it using an HTML form with the help of the action attribute:

<form action="mailto:[email protected]">
...
</form>

But this method may not be reliable for all browsers.

Misspeak answered 21/5, 2009 at 2:24 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.