How to validate email address before sending mail

2004-05-21 Thread Issac Rosa
Does anyone know a good way to validate an email address prior to
sending out the email?The scenario is that I have a database of
customers and want to send an email, but want to capture the email
addresses that will bounce prior to sending the email.



TIA,

Issac
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: How to validate email address before sending mail

2004-05-21 Thread Bryan F. Hogan
Yes use the following

script
function checkForm(theForm)	{
var emailRegex=/^\w+([\.-]?\w+)[EMAIL PROTECTED]([\.-]?\w+)*(\.\w{2,})+$/;
if(document.forms[theForm.name].contactEmail.value.length==0||emailRegex.test(document.forms[theForm.name].contactEmail.value)==false) 
{
alert('Please enter the email address!');
return false;
} else {
return true;
}
}
/script
form name=myForm action="" method=post  
checkForm(this)
...
/form

Issac Rosa wrote:

 Does anyone know a good way to validate an email address prior to
 sending out the email?The scenario is that I have a database of
 customers and want to send an email, but want to capture the email
 addresses that will bounce prior to sending the email.
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: How to validate email address before sending mail

2004-05-21 Thread Scott Weikert
At 12:26 PM 5/21/2004, you wrote:
Does anyone know a good way to validate an email address prior to
sending out the email?The scenario is that I have a database of
customers and want to send an email, but want to capture the email
addresses that will bounce prior to sending the email.

I use a custom tag called ValidEmail (off the DevEx) that works pretty 
well. It's not 100% though.
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: How to validate email address before sending mail

2004-05-21 Thread Hassan Arteaga Rodriguez
Try this

 
cfif NOT REFindnocase(^[-_!a-z0-9\.]+@([-_a-z0-9]+\.)+[a-z]{2,6}$,
form.email_Field)

 
Regards

 
__
M.Sc. Hassan Arteaga Rodrguez
Microsoft Certified System Engineer
DIGI-Grupo de Desarrollo
COPEXTEL, S.A.

_

From: Issac Rosa [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 21, 2004 1:26 PM
To: CF-Talk
Subject: How to validate email address before sending mail

Does anyone know a good way to validate an email address prior to
sending out the email?The scenario is that I have a database of
customers and want to send an email, but want to capture the email
addresses that will bounce prior to sending the email.

TIA,

Issac 
_
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: How to validate email address before sending mail

2004-05-21 Thread techmike
Do you want to validate just to make sure it fits the proper format for 
email, or to test if the domain and box exist?

I know of no way to do the later, but you could use regular expressions to 
validate the format of the email.

Do a google for email validation regex

-mike

-Original Message-
From: Issac Rosa [EMAIL PROTECTED]
To: CF-Talk [EMAIL PROTECTED]
Date: Fri, 21 May 2004 14:26:03 -0400
Subject: How to validate email address before sending mail

 Does anyone know a good way to validate an email address prior to
 sending out the email?The scenario is that I have a database of
 customers and want to send an email, but want to capture the email
 addresses that will bounce prior to sending the email.
 

 

 

 
 TIA,
 

 
 Issac
 

 
 
 
 

 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: How to validate email address before sending mail

2004-05-21 Thread Issac Rosa
Thanks, I already do this prior to saving the email in the db.I want
to test the mailbox to make sure I get a valid response to avoid bounced
messages prior to sending the actual email.

-Original Message-
From: Bryan F. Hogan [mailto:[EMAIL PROTECTED] 
Sent: Friday, May 21, 2004 2:31 PM
To: CF-Talk
Subject: Re: How to validate email address before sending mail

Yes use the following

script
function checkForm(theForm) {
var emailRegex=/^\w+([\.-]?\w+)[EMAIL PROTECTED]([\.-]?\w+)*(\.\w{2,})+$/;
if(document.forms[theForm.name].contactEmail.value.length==0||emailRegex
.test(document.forms[theForm.name].contactEmail.value)==false) 
{
alert('Please enter the email address!');
return false;
} else {
return true;
}
}
/script
form name=myForm action="" method=post  
checkForm(this)
...
/form

Issac Rosa wrote:

 Does anyone know a good way to validate an email address prior to
 sending out the email?The scenario is that I have a database of
 customers and want to send an email, but want to capture the email
 addresses that will bounce prior to sending the email.

_
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: How to validate email address before sending mail

2004-05-21 Thread Bryan F. Hogan
Good luck.

Issac Rosa wrote:

 Thanks, I already do this prior to saving the email in the db.I want
 to test the mailbox to make sure I get a valid response to avoid bounced
 messages prior to sending the actual email.
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: How to validate email address before sending mail

2004-05-21 Thread Paul Vernon
You can't guarantee that you will get the response you are expecting, for
instance MS Exchange 2000 servers and below all respond 250 if the domain is
valid and accept the mail, they may well bounce it later but if they manage
that domain, they will accept anything sent to it initially. I know Exchange
2003 operates differently if you want it to in that it will only accept mail
for the defined mailboxes if you set it up that way. As for other mail
servers, I think how this is implemented is totally dependent on how the
developers interpreted the relevant RFC documentation.

 
Paul
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: How to validate email address before sending mail

2004-05-21 Thread Rick Root
Issac Rosa wrote:

 Does anyone know a good way to validate an email address prior to
 sending out the email?The scenario is that I have a database of
 customers and want to send an email, but want to capture the email
 addresses that will bounce prior to sending the email.

It can't be done reliably.MANY mail servers will accept mail for 
non-existent accounts, then bounce them.

- Rick
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]