Package railo.runtime.net.mail

Examples of railo.runtime.net.mail.MailClient$_Authenticator


     
      // check attrs
      if(port==-1)port=getDefaultPort();
     
      //PopClient client = new PopClient(server,port,username,password);
      MailClient client = MailClient.getInstance(getType(),server,port,username,password);
        client.setTimeout(timeout*1000);
        client.setMaxrows(maxrows);
        if(startrow>1)client.setStartrow(startrow-1);
        client.setUniqueFilenames(generateUniqueFilenames);
        if(attachmentPath!=null)client.setAttachmentDirectory(attachmentPath);
       
        if(uid!=null)messageNumber=null;
       
        try {
            client.connect();
           
            if(action.equals("getheaderonly")) {
                required(getTagName(),action,"name",name);
                pageContext.setVariable(name,client.getMails(messageNumber,uid,false));
            }
            else if(action.equals("getall")) {
                required(getTagName(),action,"name",name);
                pageContext.setVariable(name,client.getMails(messageNumber,uid,true));
            }
            else if(action.equals("delete")) {
                client.deleteMails(messageNumber,uid);
            }
            else throw new ApplicationException("invalid value for attribute action, valid values are [getHeaderOnly,getAll,delete]");
        }
        catch(Exception e) {
            throw Caster.toPageException(e);
        }
        finally{
            client.disconnectEL();
        }
        return SKIP_BODY;
    }
View Full Code Here

TOP

Related Classes of railo.runtime.net.mail.MailClient$_Authenticator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.