Vallikun Kathiresan wrote:

>I am using the SMTPClient to send email to myself when some one fills out a form. I 
>would like to know how I can ensure their >email address is correct becuase I do not 
>send email back to them for a couple of days until their request is processed. ANY 
>HELP >IS GREATLY APPRECIATED
>


Well you did say any... :-)

I only use javamail.  The benefits you get from it is like using StringBuffers instead 
of Strings.  I am not saying it is faster but the overall flexibility is improved.

<snip>
    Address[] fromAddress;
    Store store = null;

<snip>
           Properties props = new Properties();
           props.put("mail.store.protocol","pop3");
           props.put("mail.smtp.host",ipAddress);

           Session session = Session.getDefaultInstance(props, null);

           store = session.getStore();

<snip>
           Folder folder = store.getFolder("INBOX");
           if (folder == null || !folder.exists())
           {
            System.out.println("Invalid folder");
            System.exit(1);
           }

<snip>
             folder.open(Folder.READ_WRITE);
            Message[] msgs = folder.getMessages();

<snip>
             for (int i = 0; i < msgs.length; i++)
             {
                  fromAddress = msgs[i].getFrom();
            ........

Regards,
Mike

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to