Examples of MailException


Examples of cn.bran.play.exceptions.MailException

            }
            // reset the infomap
            infos.remove();
            return Mail.send(email);
        } catch (EmailException ex) {
            throw new MailException("Cannot send email", ex);
        }
    }
View Full Code Here

Examples of com.alibaba.citrus.service.mail.MailException

                if (getHandler() != null) {
                    getHandler().prepareConnection(store);
                }
            } catch (NoSuchProviderException e) {
                store = null;
                throw new MailException("Could not find a provider of " + getProtocol() + " protocol", e);
            } catch (MessagingException me) {
                store = null;
                throw new MailException("Could not connect to the store", me);
            }
        }
    }
View Full Code Here

Examples of com.alibaba.citrus.service.mail.MailException

                }

                message.setFlag(Flags.Flag.DELETED, deleteMessage);
            }
        } catch (MessagingException me) {
            throw new MailException("Could not receive messages", me);
        } finally {
            try {
                if (inbox != null && inbox.isOpen()) {
                    inbox.close(true);
                }
View Full Code Here

Examples of com.alibaba.citrus.service.mail.MailException

                if (getHandler() != null) {
                    getHandler().prepareConnection(transport);
                }
            } catch (NoSuchProviderException e) {
                transport = null;
                throw new MailException("Could not find a provider of " + getProtocol() + " protocol", e);
            } catch (MessagingException me) {
                transport = null;
                throw new MailException("Could not connect to the transport", me);
            }
        }
    }
View Full Code Here

Examples of com.alibaba.citrus.service.mail.MailException

            message.saveChanges();

            Address[] recipients = message.getAllRecipients();

            if (isEmptyArray(recipients)) {
                throw new MailException("No recipient was specified in mail");
            }

            transport.sendMessage(message, recipients);
        } catch (MessagingException me) {
            throw new MailException("Could not send message", me);
        } finally {
            if (autoClose) {
                close();
            }
        }
View Full Code Here

Examples of com.alibaba.citrus.service.mail.MailException

                if (getHandler() != null) {
                    getHandler().prepareConnection(store);
                }
            } catch (NoSuchProviderException e) {
                store = null;
                throw new MailException("Could not find a provider of " + getProtocol() + " protocol", e);
            } catch (MessagingException me) {
                store = null;
                throw new MailException("Could not connect to the store", me);
            }
        }
    }
View Full Code Here

Examples of com.alibaba.citrus.service.mail.MailException

                }

                message.setFlag(Flags.Flag.DELETED, deleteMessage);
            }
        } catch (MessagingException me) {
            throw new MailException("Could not receive messages", me);
        } finally {
            try {
                if (inbox != null && inbox.isOpen()) {
                    inbox.close(true);
                }
View Full Code Here

Examples of com.alibaba.citrus.service.mail.MailException

                if (getHandler() != null) {
                    getHandler().prepareConnection(transport);
                }
            } catch (NoSuchProviderException e) {
                transport = null;
                throw new MailException("Could not find a provider of " + getProtocol() + " protocol", e);
            } catch (MessagingException me) {
                transport = null;
                throw new MailException("Could not connect to the transport", me);
            }
        }
    }
View Full Code Here

Examples of com.alibaba.citrus.service.mail.MailException

            message.saveChanges();

            Address[] recipients = message.getAllRecipients();

            if (isEmptyArray(recipients)) {
                throw new MailException("No recipient was specified in mail");
            }

            transport.sendMessage(message, recipients);
        } catch (MessagingException me) {
            throw new MailException("Could not send message", me);
        } finally {
            if (autoClose) {
                close();
            }
        }
View Full Code Here

Examples of com.alibaba.citrus.service.mail.MailException

                if (getHandler() != null) {
                    getHandler().prepareConnection(store);
                }
            } catch (NoSuchProviderException e) {
                store = null;
                throw new MailException("Could not find a provider of " + getProtocol() + " protocol", e);
            } catch (MessagingException me) {
                store = null;
                throw new MailException("Could not connect to the store", me);
            }
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.