Results 1 to 4 of 4
  1. #1
    Raghuvasa is offline Member
    Join Date
    Oct 2008
    Posts
    5
    Rep Power
    0

    Default How To check email existed or not

    Hi All,

    I have developed one web application
    in that i have one user registration application and having fields like name dob and Email id.

    if the user specifies any email id then we have to send a mail to specified email address. sending mail is ok.


    but before this i have to check the specified email id is existed or not
    i mean domain and address were existed or not.

    and if mail id is not correct then we will get a failure notice but i want to
    find the response if it is failure. not failure mail.



    How can i do it.

  2. #2
    RamyaSivakanth's Avatar
    RamyaSivakanth is offline Senior Member
    Join Date
    Apr 2009
    Location
    Chennai
    Posts
    878
    Rep Power
    12

    Default

    Hi Raghuvasa,
    You can use javax.mail.internet api for checking the validity of EmailAddress like this below.

    Gothru below link
    InternetAddress (Java 2 Platform Ent. Ed. v1.4)

    Java Code:
    [B]InternetAddress address = new InternetAddress("specify the address");
    
    address.validate();[/B]
    Ramya:cool:

  3. #3
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    13,541
    Rep Power
    27

    Default

    Quote Originally Posted by Raghuvasa View Post
    but before this i have to check the specified email id is existed or not
    i mean domain and address were existed or not.
    If you mean whether an email address exists (ie does blah@blah.com exist), you can't. There's no reliable method for doing that.

  4. #4
    OrangeDog's Avatar
    OrangeDog is offline Senior Member
    Join Date
    Jan 2009
    Location
    Cambridge, UK
    Posts
    838
    Rep Power
    12

    Default

    Send a validation email with some kind of secure generated code that the user must then enter.

    Of course, won't work with one-time email addresses.
    Don't forget to mark threads as [SOLVED] and give reps to helpful posts.
    How To Ask Questions The Smart Way

Similar Threads

  1. Replies: 4
    Last Post: 06-03-2009, 06:17 AM
  2. automatic email
    By pracheebapate in forum New To Java
    Replies: 2
    Last Post: 01-18-2009, 08:07 PM
  3. Check email by background thread
    By sheky in forum JavaServer Pages (JSP) and JSTL
    Replies: 5
    Last Post: 10-21-2008, 03:16 PM
  4. send email using apache commons email
    By jnamendi in forum JavaServer Faces (JSF)
    Replies: 0
    Last Post: 10-14-2008, 05:55 PM
  5. help in email developing
    By reached in forum New To Java
    Replies: 0
    Last Post: 12-09-2007, 07:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •