g Text Version
Beauty & Self
Books & Music
Food & Wine
Health & Fitness
Hobbies & Crafts
Home & Garden
News & Politics
Religion & Spirituality
Travel & Culture
TV & Movies

Bored? Games!
Take a Quiz
Rate My Photo

Home Improvement
Women's Fashion
Small Office/Home Office
Holiday/Seasonal Cooking
Crafts for Kids

All times in EST

Full Schedule
g ASP Site

BellaOnline's ASP Editor


Parsing an Email Address

There are many reasons that a website would want to take in an email address. It might be for a newsletter or for a response to a question. Make sure the email address is valid!

It's not that most users will deliberately give you a bad email address. They're trying to subscribe to your newsletter, or send you information after all! But web users are not always the best typists. If they make a typo or mistake, they might not even realize it. Here are some steps you can take to ensure you are able to contact them with the information they want.

* Give them a big enough form field
You would think this might be obvious! But some websites give their users tiny little 2-character spots in which to type a long email address. If the user types something wrong, they aren't able to see it! Give your users as much space as humanly possible to type their email address in. Some users have extremely long addresses, like timothy_bertuccio@mail.umichigan.edu.

* Trim out all spaces
Users often put in spaces by mistake, something like janedoe @ aol.com. They do it without thinking. Your mail server will choke on that, though! Do a simple

email = replace(email, " ", "")

command to turn all spaces into nothing. That probably takes care of 50% of typical user errors.

* Give an error if no @ or . found
All email addresses must have a @ as the separator and at least one . in the server name. Use InStr to make sure there really is a @ and a . in that email address. If one or both is not found, give the user an error and have them try again.

* Help AOL Users
For some reason, it seems that AOL users often have trouble with the ".com" part of their email address. They put in aol.con or aol.co or even just aol without anything else. If you see @aol. as a string in the email, and what follows it is not the letters COM, it might be helpful to change that for them.

* Sent a Thank You
One of the easiest ways to ensure an email address works is to use it immediately. Send the user a thank you letter back in the processing page, and then put a message on the screen telling the user you just sent them that letter. Tell them that if they did NOT get the thank you letter, that they should check the email address they entered, or check the spam filters. That way, when you send your actual response or newsletter, you have at least half a chance of it getting to them.

Introduction to ASP Ebook

Download this ebook to get everything you need to know about learning ASP - from a step by step tutorial to function lists, sample code, common errors and solutions, and much more! 101 pages.
Add Parsing+an+Email+Address to Twitter Add Parsing+an+Email+Address to Facebook Add Parsing+an+Email+Address to MySpace Add Parsing+an+Email+Address to Del.icio.us Digg Parsing+an+Email+Address Add Parsing+an+Email+Address to Yahoo My Web Add Parsing+an+Email+Address to Google Bookmarks Add Parsing+an+Email+Address to Stumbleupon Add Parsing+an+Email+Address to Reddit

RSS | Editor's Picks Articles | Top Ten Articles | Previous Features | Site Map

For FREE email updates, subscribe to the ASP Newsletter

Past Issues

Printer Friendly
tell friend
Tell a Friend
Email Editor

Content copyright © 2015 by Lisa Shea. All rights reserved.
This content was written by Lisa Shea. If you wish to use this content in any manner, you need written permission. Contact Lisa Shea for details.


g features
Regular Expression Pattern Matching

Split ASP String Function

Saving Changes is Not Permitted error

Archives | Site Map


Past Issues

Less than Monthly

BellaOnline on Facebook

| About BellaOnline | Privacy Policy | Advertising | Become an Editor |
Website copyright © 2015 Minerva WebWorks LLC. All rights reserved.

BellaOnline Editor