Package javax.mail.internet

Examples of javax.mail.internet.MimeMessage.removeHeader()


      {
        log.error("failed to connect to mailarchiva server {url='" + mailArchivaServerURL.getHost() + "'}", e);
        System.exit(1);
      }

      m.removeHeader("Delivered-To");
      m.removeHeader("X-Original-To");
     
      InternetAddress[] addresses = new InternetAddress[1];
      addresses[0]= recipientAddress;
View Full Code Here


        log.error("failed to connect to mailarchiva server {url='" + mailArchivaServerURL.getHost() + "'}", e);
        System.exit(1);
      }

      m.removeHeader("Delivered-To");
      m.removeHeader("X-Original-To");
     
      InternetAddress[] addresses = new InternetAddress[1];
      addresses[0]= recipientAddress;

//      Transport tr = session.getTransport("smtp");
View Full Code Here

                storeMail(mail.getSender(), recipient, mail);

                if (deliveryHeader != null) {
                    if (i.hasNext()) {
                        // Remove headers but leave all placeholders
                        message.removeHeader(deliveryHeader);
                        headers = deliveredTo.getAllHeaders();
                        // And restore any original Delivered-To headers
                        while (headers.hasMoreElements()) {
                            Header header = (Header) headers.nextElement();
                            message.addHeader(header.getName(), header
View Full Code Here

            if (mail != null) {
                // if the previous e-mail was sent for a success, this new e-mail
                // is not a follow up
                AbstractBuild<?, ?> pb = build.getPreviousBuild();
                if(pb!=null && pb.getResult()==Result.SUCCESS) {
                    mail.removeHeader("In-Reply-To");
                    mail.removeHeader("References");
                }

                Address[] allRecipients = mail.getAllRecipients();
                if (allRecipients != null) {
View Full Code Here

                // if the previous e-mail was sent for a success, this new e-mail
                // is not a follow up
                AbstractBuild<?, ?> pb = build.getPreviousBuild();
                if(pb!=null && pb.getResult()==Result.SUCCESS) {
                    mail.removeHeader("In-Reply-To");
                    mail.removeHeader("References");
                }

                Address[] allRecipients = mail.getAllRecipients();
                if (allRecipients != null) {
                    StringBuilder buf = new StringBuilder("Sending e-mails to:");
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.