use of org.simplejavamail.email.internal.EmailPopulatingBuilderFactoryImpl in project simple-java-mail by bbottema.
the class EmailConverter method outlookMsgToEmailBuilder.
/**
* @param msgInputStream The content of an Outlook (.msg) message from which to create the {@link Email}.
*/
@SuppressWarnings("deprecation")
@NotNull
public static EmailFromOutlookMessage outlookMsgToEmailBuilder(@NotNull final InputStream msgInputStream, @Nullable final Pkcs12Config pkcs12Config) {
EmailFromOutlookMessage fromMsgBuilder = ModuleLoader.loadOutlookModule().outlookMsgToEmailBuilder(msgInputStream, new EmailStartingBuilderImpl(), new EmailPopulatingBuilderFactoryImpl(), InternalEmailConverterImpl.INSTANCE);
decryptAttachments(fromMsgBuilder.getEmailBuilder(), fromMsgBuilder.getOutlookMessage(), pkcs12Config);
return fromMsgBuilder;
}
use of org.simplejavamail.email.internal.EmailPopulatingBuilderFactoryImpl in project simple-java-mail by bbottema.
the class EmailConverter method outlookMsgToEmailBuilder.
/**
* @param msgFile The content of an Outlook (.msg) message from which to create the {@link Email}.
* @param pkcs12Config Private key store for decrypting S/MIME encrypted attachments
* (only needed when the message is encrypted rather than just signed).
*/
@SuppressWarnings({ "deprecation" })
@NotNull
public static EmailPopulatingBuilder outlookMsgToEmailBuilder(@NotNull final File msgFile, @Nullable final Pkcs12Config pkcs12Config) {
checkNonEmptyArgument(msgFile, "msgFile");
EmailFromOutlookMessage result = ModuleLoader.loadOutlookModule().outlookMsgToEmailBuilder(msgFile, new EmailStartingBuilderImpl(), new EmailPopulatingBuilderFactoryImpl(), InternalEmailConverterImpl.INSTANCE);
return decryptAttachments(result.getEmailBuilder(), result.getOutlookMessage(), pkcs12Config);
}
use of org.simplejavamail.email.internal.EmailPopulatingBuilderFactoryImpl in project simple-java-mail by bbottema.
the class EmailConverter method outlookMsgToEmail.
/**
* @param msgData The content of an Outlook (.msg) message from which to create the {@link Email}.
* @param pkcs12Config Private key store for decrypting S/MIME encrypted attachments
* (only needed when the message is encrypted rather than just signed).
*/
@SuppressWarnings("deprecation")
@NotNull
public static Email outlookMsgToEmail(@NotNull final String msgData, @Nullable final Pkcs12Config pkcs12Config) {
checkNonEmptyArgument(msgData, "msgFile");
EmailFromOutlookMessage result = ModuleLoader.loadOutlookModule().outlookMsgToEmailBuilder(msgData, new EmailStartingBuilderImpl(), new EmailPopulatingBuilderFactoryImpl(), InternalEmailConverterImpl.INSTANCE);
return decryptAttachments(result.getEmailBuilder(), result.getOutlookMessage(), pkcs12Config).buildEmail();
}
Aggregations