public class MailUtils extends Object
Constructor and Description |
---|
MailUtils() |
Modifier and Type | Method and Description |
---|---|
static String |
getAttachmentName(String key,
Map<String,Part> attachments)
Check whether an attachment with the same name already exists,
using a counter for override protection.
|
static void |
getAttachments(Multipart content,
Map<String,Part> attachments) |
static String |
internetAddressesToString(InternetAddress address) |
static String |
internetAddressesToString(InternetAddress[] addresses) |
static boolean |
isListHeader(String name)
Check whether a property name has the format associated with a list
of header values
|
static String |
mailAddressesToString(Address address) |
static String |
mailAddressesToString(Address[] addresses) |
static InternetAddress[] |
stringToInternetAddresses(String address) |
static String |
toListHeader(String header)
Convert a header name to the property name associated with a list of
header values (ie prepend the prefix)
|
public static String internetAddressesToString(InternetAddress[] addresses)
public static String internetAddressesToString(InternetAddress address)
public static InternetAddress[] stringToInternetAddresses(String address) throws AddressException
AddressException
public static void getAttachments(Multipart content, Map<String,Part> attachments) throws MessagingException, IOException
MessagingException
IOException
public static String getAttachmentName(String key, Map<String,Part> attachments)
key
- A attachment nameattachments
- Map with attachmentspublic static boolean isListHeader(String name)
name
- A property nameCopyright © 2003–2016 MuleSoft, Inc.. All rights reserved.