List of usage examples for javax.mail Header getName
public String getName()
From source file:org.simplejavamail.internal.util.MimeMessageParser.java
private static boolean isCustomUserHeader(final Header header) { return !DEFAULT_HEADERS.contains(header.getName()); }
From source file:org.socraticgrid.displaymaildata.DisplayMailDataHandler.java
/** * Prints all header attributes in a Msg * @param msgs/*from w w w .ja va 2 s . c om*/ */ void printEmailMsg(Message msg) throws MessagingException { Enumeration headers = msg.getAllHeaders(); while (headers.hasMoreElements()) { Header h = (Header) headers.nextElement(); System.out.println(h.getName() + ": " + h.getValue()); } }
From source file:org.springframework.ws.transport.mail.MailSenderConnection.java
@Override protected Iterator<String> getResponseHeaderNames() throws IOException { try {// ww w . j a va2s .c o m List<String> headers = new ArrayList<String>(); Enumeration<?> enumeration = responseMessage.getAllHeaders(); while (enumeration.hasMoreElements()) { Header header = (Header) enumeration.nextElement(); headers.add(header.getName()); } return headers.iterator(); } catch (MessagingException ex) { throw new MailTransportException(ex); } }