Example usage for javax.mail.event TransportEvent getValidUnsentAddresses

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

Introduction

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

Prototype

public Address[] getValidUnsentAddresses() 

Source Link

Document

Return the addresses that are valid but to which this message was not sent.

Usage

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]);
    }//from   w  ww  .  j  a  va  2 s .  c o 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]);
    }
}