Examples of MailService


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

        }

        MailBuilder builder = getMailBuilder(false);

        if (builder != null) {
            MailService mailService = builder.getMailService();

            if (mailService != null) {
                return mailService.getService(serviceType, defaultId);
            }
        }

        return null;
    }
View Full Code Here

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

            return mailRef;
        }

        @Override
        protected void render(Part mailPart, String fileName) {
            MailService mailService = getMailBuilder().getMailService();

            if (mailService == null) {
                throw new MailBuilderException("Could not find mail \"" + mailRef + "\": no MailService");
            }

            MailBuilder mailBuilder;

            try {
                mailBuilder = mailService.getMailBuilder(mailRef);
            } catch (MailNotFoundException e) {
                throw new MailBuilderException("Could not find mail \"" + mailRef + "\"", e);
            }

            Message mail = mailBuilder.getMessage(getMailBuilder().getSession());
View Full Code Here

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

    /**
     * ����һ��email��
     */
    public void send(String mailId, MailTransportHandler handler) throws MailException {
        MailService service = getMailService();

        if (service == null) {
            throw new MailNotFoundException("Could not find mail \"" + mailId + "\": mail service is not set");
        }

        MailBuilder builder = service.getMailBuilder(mailId);

        send(builder, handler);
    }
View Full Code Here

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

    /**
     * ��һЩ������Ҫ������smtp֮ǰ����pop3��������ȥ��֤��
     */
    private void connectPopBeforeSmtp() throws MailException {
        if (popBeforeSmtpId != null) {
            MailService service = getMailService();

            if (service == null) {
                throw new MailStoreNotFoundException("Could not find mail store \"" + popBeforeSmtpId
                        + "\": mail service is not set");
            }

            MailStore popBeforeSmtpStore = assertNotNull(service.getMailStore(popBeforeSmtpId),
                    "popBeforeSmtpStore: %s", popBeforeSmtpId);

            try {
                popBeforeSmtpStore.connect();
            } finally {
View Full Code Here

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

            return mailRef;
        }

        @Override
        protected void render(Part mailPart, String fileName) {
            MailService mailService = getMailBuilder().getMailService();

            if (mailService == null) {
                throw new MailBuilderException("Could not find mail \"" + mailRef + "\": no MailService");
            }

            MailBuilder mailBuilder;

            try {
                mailBuilder = mailService.getMailBuilder(mailRef);
            } catch (MailNotFoundException e) {
                throw new MailBuilderException("Could not find mail \"" + mailRef + "\"", e);
            }

            Message mail = mailBuilder.getMessage(getMailBuilder().getSession());
View Full Code Here

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

        send(mailId, null);
    }

    /** 发送一个email。 */
    public void send(String mailId, MailTransportHandler handler) throws MailException {
        MailService service = getMailService();

        if (service == null) {
            throw new MailNotFoundException("Could not find mail \"" + mailId + "\": mail service is not set");
        }

        MailBuilder builder = service.getMailBuilder(mailId);

        send(builder, handler);
    }
View Full Code Here

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

    }

    /** 有一些服务器要求在连smtp之前,到pop3服务器上去验证。 */
    private void connectPopBeforeSmtp() throws MailException {
        if (popBeforeSmtpId != null) {
            MailService service = getMailService();

            if (service == null) {
                throw new MailStoreNotFoundException("Could not find mail store \"" + popBeforeSmtpId
                                                     + "\": mail service is not set");
            }

            MailStore popBeforeSmtpStore = assertNotNull(service.getMailStore(popBeforeSmtpId),
                                                         "popBeforeSmtpStore: %s", popBeforeSmtpId);

            try {
                popBeforeSmtpStore.connect();
            } finally {
View Full Code Here

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

        }

        MailBuilder builder = getMailBuilder(false);

        if (builder != null) {
            MailService mailService = builder.getMailService();

            if (mailService != null) {
                return mailService.getService(serviceType, defaultId);
            }
        }

        return null;
    }
View Full Code Here

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

    /**
     * ����һ��email��
     */
    public void send(String mailId, MailTransportHandler handler) throws MailException {
        MailService service = getMailService();

        if (service == null) {
            throw new MailNotFoundException("Could not find mail \"" + mailId + "\": mail service is not set");
        }

        MailBuilder builder = service.getMailBuilder(mailId);

        send(builder, handler);
    }
View Full Code Here

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

    /**
     * ��һЩ������Ҫ������smtp֮ǰ����pop3��������ȥ��֤��
     */
    private void connectPopBeforeSmtp() throws MailException {
        if (popBeforeSmtpId != null) {
            MailService service = getMailService();

            if (service == null) {
                throw new MailStoreNotFoundException("Could not find mail store \"" + popBeforeSmtpId
                        + "\": mail service is not set");
            }

            MailStore popBeforeSmtpStore = assertNotNull(service.getMailStore(popBeforeSmtpId),
                    "popBeforeSmtpStore: %s", popBeforeSmtpId);

            try {
                popBeforeSmtpStore.connect();
            } finally {
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.