Forum Moderators: phranque

Message Too Old, No Replies

contact form - getting the user's email address

         

hal12b

6:03 pm on Jul 7, 2010 (gmt 0)

10+ Year Member



We have multiple contact forms across many web sites and within our contact forms we ask for many different pieces of information, but obviously we ask for the users email address. We even ask them to enter it twice and have server side code to check to see that they have entered a ".", "@", etc... but we still get plenty of people entering incorrect email addresses, incorrect in the sense that they enter somename@someemail.com when it should possibly be somename@someemail.net We use ASP.net. Is there anything else we can do to make sure the user enters a REAL email address? Thanks

Demaestro

7:21 pm on Jul 7, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



There are a couple things you can do.


During server side form validation you can use SENDMAIL VRFY to test the email. Or you can just send an email and get the delivery status.

However this will only tell you if that server's mailhost is accepting messages for that email address. It won't tell you if the person filling out the form really has access to that email.

For example if they put somename@someemail.com when it should have been somename@someemail.net but somename@someemail.com is still valid then it won't help.

You can do an email verification step where you send an email with a link. Clicking the link marks the email account as valid and then you can proceed from there.

Not sure which of these solutions fit your workflow.

If you have more questions post back.

hal12b

12:03 pm on Jul 8, 2010 (gmt 0)

10+ Year Member



This would still hypothetically send an undeliverable email though, correct? --> "You can do an email verification step where you send an email with a link. Clicking the link marks the email account as valid and then you can proceed from there."

I don't think there is much more I can do. The only thing I can think of is to check somehow to see if the domain name is actually registered, if not, don't allow the email to be sent. This still won't prevent as you mentioned people that get the domain name correct, but put something incorrect before the @ symbol.

lammert

12:31 pm on Jul 11, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



A domain which is registered may not have been setup for email reception. Email can be delivered to a domain if it either has MX, or A records in the DNS configuration. That doesn't tell you that it can receive emails, but you will at least be able to seperate a large group of parked domains.