Package org.apache.jsieve.mail

Examples of org.apache.jsieve.mail.SieveMailException


    }
    public String getContentType() throws SieveMailException {
        try {
            return getMessage().getContentType();
        } catch (MessagingException e) {
            throw new SieveMailException(e);
        }
    }
View Full Code Here


    public List<String> getHeader(String name) throws SieveMailException {
        try {
            String[] headers = getMessage().getHeader(name);
            return (headers == null ? new ArrayList<String>(0) : Arrays.asList(headers));
        } catch (MessagingException ex) {
            throw new SieveMailException(ex);
        }
    }
View Full Code Here

            while (allHeaders.hasMoreElements()) {
                headerNames.add(((Header) allHeaders.nextElement()).getName());
            }
            return new ArrayList<String>(headerNames);
        } catch (MessagingException ex) {
            throw new SieveMailException(ex);
        }
    }
View Full Code Here

     */
    public int getSize() throws SieveMailException {
        try {
            return getMessage().getSize();
        } catch (MessagingException ex) {
            throw new SieveMailException(ex);
        }
    }
View Full Code Here

     */
    public String getContentType() throws SieveMailException {
        try {
            return getMessage().getContentType();
        } catch (MessagingException ex) {
            throw new SieveMailException(ex);
        }
    }
View Full Code Here

            final Address[] results = builder.getAddresses();
            return results;

        } catch (MessagingException ex) {
            throw new SieveMailException(ex);
        } catch (org.apache.jsieve.parser.generated.address.ParseException ex) {
            throw new SieveMailException(ex);
        }
    }
View Full Code Here

    public boolean isInBodyText(String phraseCaseInsensitive) throws SieveMailException {
        try {
            return contentAsText().indexOf(phraseCaseInsensitive.toLowerCase()) != -1;
        } catch (MessagingException ex) {
            throw new SieveMailException(ex);
        } catch (IOException ex) {
            throw new SieveMailException(ex);
        }
    }
View Full Code Here

                String[] values = mail.getHeader(name);
                if (values != null) {
                    result = Arrays.asList(values);
                }
            } catch (MessagingException e) {
                throw new SieveMailException(e);
            }
        }
        return result;
    }
View Full Code Here

                    if (!results.contains(name)) {
                        results.add(name);
                    }
                }
            } catch (MessagingException e) {
                throw new SieveMailException(e);
            }
        }
        return results;
    }
View Full Code Here

        int result = 0;
        if (mail != null) {
            try {
                result = mail.getSize();
            } catch (MessagingException e) {
                throw new SieveMailException(e);
            }
        }
        return result;
    }
View Full Code Here

TOP

Related Classes of org.apache.jsieve.mail.SieveMailException

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.