Example usage for javax.mail.event TransportEvent getInvalidAddresses

List of usage examples for javax.mail.event TransportEvent getInvalidAddresses

Introduction

In this page you can find the example usage for javax.mail.event TransportEvent getInvalidAddresses.

Prototype

public Address[] getInvalidAddresses() 

Source Link

Document

Return the addresses to which this message could not be sent.

Usage

From source file:org.tsm.concharto.service.EmailService.java

/**
 * @see TransportListener#messageNotDelivered(javax.mail.event.TransportEvent)
 *///from   w ww. jav a 2 s . c o m
public void messageNotDelivered(TransportEvent e) {
    Address[] invalidSentAddresses = e.getInvalidAddresses();
    String addressList = "TransportListener.messageNotDelivered, Invalid Addresses: "
            + StringUtils.join(invalidSentAddresses, ',');
    log.warn(addressList);
}

From source file:transport.java

public void messageNotDelivered(TransportEvent e) {
    System.out.println(">>> TransportListener.messageNotDelivered().");
    System.out.println(" Invalid Addresses:");
    Address[] invalid = e.getInvalidAddresses();
    if (invalid != null) {
        for (int i = 0; i < invalid.length; i++)
            System.out.println("    " + invalid[i]);
    }/*from  w  w w  . ja  v  a2 s  .  co  m*/
}

From source file:transport.java

public void messageNotDelivered(TransportEvent e) {
    System.out.print(">>> TransportListener.messageNotDelivered().");
    System.out.println(" Invalid Addresses:");
    Address[] invalid = e.getInvalidAddresses();
    if (invalid != null) {
        for (int i = 0; i < invalid.length; i++)
            System.out.println("    " + invalid[i]);
    }//from w  w w.j  a  va 2 s. c om
}

From source file:transport.java

public void messagePartiallyDelivered(TransportEvent e) {
    System.out.println(">>> TransportListener.messagePartiallyDelivered().");
    System.out.println(" Valid Addresses:");
    Address[] valid = e.getValidSentAddresses();
    if (valid != null) {
        for (int i = 0; i < valid.length; i++)
            System.out.println("    " + valid[i]);
    }/*  w w  w.  j  a v a2s  .co m*/
    System.out.println(" Valid Unsent Addresses:");
    Address[] unsent = e.getValidUnsentAddresses();
    if (unsent != null) {
        for (int i = 0; i < unsent.length; i++)
            System.out.println("    " + unsent[i]);
    }
    System.out.println(" Invalid Addresses:");
    Address[] invalid = e.getInvalidAddresses();
    if (invalid != null) {
        for (int i = 0; i < invalid.length; i++)
            System.out.println("    " + invalid[i]);
    }
}