Package org.fao.geonet.util

Examples of org.fao.geonet.util.JavaMailer


            String port = sm.getValue("system/feedback/mailServer/port");
            String to   = sm.getValue("system/feedback/email");

            Log.debug(Geonet.FEEDBACK, "email settings.. host: " + host + " port: " + port + " email: " + to);

            JavaMailer mailer = new JavaMailer(host, port, false, null, null);

            if(StringUtils.isEmpty(NOREPLY)) {
                NOREPLY = "noreply@geonetwork-opensource.org";
            }
            if(StringUtils.isNotEmpty(metadataEmail)) {
                if(StringUtils.isNotEmpty(to)) {
                    mailer.send(subject, body, null, NOREPLY, to, metadataEmail);
                }
                else {
                    mailer.send(subject, body, null, NOREPLY, metadataEmail);
                }
            }
            else {
                if(StringUtils.isNotEmpty(to)) {
                    mailer.send(subject, body, null, NOREPLY, to);
                }
                else {
                    Element response = new Element("response");
                    response.setText("Feedback email not sent, because both the catalog system email and the metadata email were empty.");
                }
View Full Code Here

TOP

Related Classes of org.fao.geonet.util.JavaMailer

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.