Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 24th, 2004, 03:11 AM
rafi_aamiri rafi_aamiri is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 5 rafi_aamiri User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Email Validation

Hai,

I need to validate the string for the Email entered in a text box in Oracle Forms.

If any of you have any standard function
please do let me know.

Thanks & Regards,

A.Mohammed Rafi.

Reply With Quote
  #2  
Old June 24th, 2004, 10:33 AM
jim mcnamara jim mcnamara is offline
......@.........
Dev Shed Beginner (1000 - 1499 posts)
 
Join Date: Jun 2004
Posts: 1,308 jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level)jim mcnamara User rank is Sergeant Major (2000 - 5000 Reputation Level) 
Time spent in forums: 1 Week 3 Days 5 h 17 m 10 sec
Reputation Power: 48
You have to create an external procedure.
There usually is no way to validate an email address using smtp protocol, anyway. If you are on a windows box in a WAN, exchange can validate local email addresses for you.


On unix this means:
writing a simple piece of C
Code:
int check_mail(char *recipient){
            // system specific code goes here
            return 0;  // if okay
            return 1;  // if failure
}

compile the code into a shared library,
eg: $ORACLE_HOME/libmymail.so

create a shared library Oracle can call with extproc:
Code:
CREATE OR REPLACE LIBRARY mail_utl_l
as 
 '/oracle/local/lib/libmymail.so';

create a package
Code:
CREATE OR REPLACE PACKAGE mymail
IS
         FUNCTION 
         check_mail( recipient IN VARCHAR2 DEFAULT NULL)
         RETURN PLS_INTEGER;


Now you can call the package function on the server from forms.


Also, for general mail try using the package UTL_SMTP, which can send mail and receive for you. There is no validation routine for mail recipients.

Reply With Quote
  #3  
Old June 25th, 2004, 05:39 PM
eagle_165 eagle_165 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Posts: 1 eagle_165 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Use instr function

to validate ur e-mail u have to make sure that ur text contai ns @ and . and @ comes before .
so
u can do the following " trigger when validate item "
declere
v_at number;
v_dot number;
begin
v_at := instr(:email_text , '@') ;
v_dot := instr(:email_text , '.');
if v_at = 0 or v_dot= 0 or v_at > v_dot then

-- alert with not valied message

end if;
end;

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > Email Validation


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway
Stay green...Green IT