Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: Code to Validate email addresses

RE: Code to Validate email addresses

From: Aponte, Tony <AponteT_at_hsn.net>
Date: Wed, 24 Oct 2001 10:26:20 -0700
Message-ID: <F001.003B369F.20011024103522@fatcity.com>

I'd like to make a suggestion for a different approach.  I'm thinking of something like a reverse check of the address.  Check out this web service (http://beta2.eraserver.net/webservices/mxchecker/) that accepts an email address for validation.  It returns values in different formats (string, XML, etc.)  I tried it the XML query and it returned the following:

  <?xml version="1.0" encoding="utf-8" ?>

  <boolean xmlns="http://webservices.eraserver.net/MXChecker">true</boolean>

You can process this in PL/SQL with or without the XML development kit.  If you can resolve web proxy issues with your networking folks you can use UTL_HTTP.REQUEST to call such a service.  Here is a sample I ran:

Command:

select UTL_HTTP.REQUEST('http://webservices.eraserver.net/mxchecker/mxchecker.asmx/CheckEmail?accessCode=9999&emailAddress=apontet@hsn.net') from dual;

Resulting string:

<?xml version="1.0" encoding="utf-8"?>

<string xmlns="http://webservices.eraserver.net/MXChecker">OK</string>

There are many such public services and some private ones with bells and whistles (availability, guarantees, encryption, etc.)

HTH Tony Aponte

On Wednesday 24 October 2001 06:15, Oweson Flynn wrote:

> Hi,

>

> We have implemented a form that emails reports.  The user has to enter his

> email address.

>

> However, we are finding that a lot of users are entering incorrect and

> invalid email addresses.

>

> Obviously, we can do nothing if they enter an incorrect (but syntactically

> correct) email address.

>

> What I am looking for is:

>

> 1) A definition of the syntactically correct format of an email address

> (from some sort of authoritative source)

>

> 2) Hopefully some pl/sql code that will validate a sting to see if it is a

> valid email address.

>

> If anyone can assist, I would appreciate it!

>

> Regards

> Oweson Flynn

> _____________________________________________________________________

> "Tell me what you think, Captain, I'm all ears" - Spock

>

> Certified Oracle DBA

> The Flynn Consultancy

> Tel: 082-600-7-006

> Fax: (011) 782-9313

> EMail: oef_at_icon.co.za

>

>

>

> *******************************************************************

>

> This message may contain information which is confidential and subject to

> legal privilege. If you are not the intended recipient, you may not peruse,

> use, disseminate, distribute or copy this message. If you have received

> this message in error, please notify the sender immediately by email,

> facsimile or telephone and return and/or destroy the original message.

>

> *******************************************************************

-- 

Please see the official ORACLE-L FAQ: http://www.orafaq.com

-- 

Author: Jared Still

  INET: jkstill_at_cybcon.com


Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051

San Diego, California        -- Public Internet access / Mailing Lists

--------------------------------------------------------------------

To REMOVE yourself from this mailing list, send an E-Mail message

to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in

the message BODY, include a line containing: UNSUB ORACLE-L

(or the name of mailing list you want to be removed from).  You may

also send the HELP command for other information (like subscribing).
Received on Wed Oct 24 2001 - 12:26:20 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US