public abstract class MailTransportUtils
extends java.lang.Object
| Constructor and Description |
|---|
MailTransportUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
closeFolder(javax.mail.Folder folder,
boolean expunge)
Close the given JavaMail Folder and ignore any thrown exception.
|
static void |
closeService(javax.mail.Service service)
Close the given JavaMail Service and ignore any thrown exception.
|
static java.lang.String |
toPasswordProtectedString(javax.mail.URLName name)
Returns a string representation of the given
URLName, where the
password has been protected. |
public static void closeService(javax.mail.Service service)
finally
blocks in manual JavaMail code.service - the JavaMail Service to close (may be null)Transport,
Storepublic static void closeFolder(javax.mail.Folder folder,
boolean expunge)
finally blocks in manual JavaMail code.folder - the JavaMail Folder to close (may be null)expunge - whether all deleted messages should be expunged from the folderpublic static java.lang.String toPasswordProtectedString(javax.mail.URLName name)
URLName, where the
password has been protected.name - The URL name.