Package de.xima.fc.mail
Class MailContextProvider
- java.lang.Object
-
- de.xima.fc.mail.MailContextProvider
-
public final class MailContextProvider extends Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static javax.mail.Authenticator
getAuthenticatorFor(String username, String password)
static IMailContext
getContextFor(Mandant m)
static IMailContext
getContextFor(MandantMailData mailData)
static IMailContext
getContextFor(String server, Integer port, javax.mail.Authenticator auth, EMailEncryption encryption)
static IMailContext
getContextFor(String server, Integer port, javax.mail.Authenticator auth, EMailEncryption encryption, boolean allowUtf8)
static javax.mail.Address
getSenderFromContext(Mandant m)
static javax.mail.Address
getSenderFromContext(UserContext uc, Mandant client)
static IMailContext
getSystemContext()
static void
setMailContextFactory(IMailContextFactory factory)
-
-
-
Method Detail
-
setMailContextFactory
public static void setMailContextFactory(IMailContextFactory factory)
-
getContextFor
public static IMailContext getContextFor(MandantMailData mailData)
-
getSystemContext
public static IMailContext getSystemContext()
-
getSenderFromContext
public static javax.mail.Address getSenderFromContext(UserContext uc, Mandant client) throws javax.mail.internet.AddressException, UnsupportedEncodingException
- Throws:
javax.mail.internet.AddressException
UnsupportedEncodingException
-
getSenderFromContext
public static javax.mail.Address getSenderFromContext(Mandant m) throws javax.mail.internet.AddressException, UnsupportedEncodingException
- Throws:
javax.mail.internet.AddressException
UnsupportedEncodingException
-
getContextFor
public static IMailContext getContextFor(Mandant m)
-
getContextFor
@Deprecated public static IMailContext getContextFor(String server, Integer port, javax.mail.Authenticator auth, EMailEncryption encryption)
- Parameters:
server
- Email server host.port
- Email server port.auth
- Authenticator, if any is required by the server.encryption
- Encryption to use, if any.- Returns:
- A new mail context for sending mails.
-
getContextFor
public static IMailContext getContextFor(String server, Integer port, javax.mail.Authenticator auth, EMailEncryption encryption, boolean allowUtf8)
-
-