Search in sources :

Example 1 with OutlookMessage

use of org.simplejavamail.outlookmessageparser.model.OutlookMessage 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}.
 */
public static Email outlookMsgToEmail(@Nonnull final String msgData) {
    final EmailPopulatingBuilder emailPopulatingBuilder = EmailBuilder.ignoringDefaults().startingBlank();
    final OutlookMessage outlookMessage = OutlookMessageParser.parseOutlookMsg(checkNonEmptyArgument(msgData, "msgData"));
    buildEmailFromOutlookMessage(emailPopulatingBuilder, outlookMessage);
    return emailPopulatingBuilder.buildEmail();
}
Also used : EmailPopulatingBuilder(org.simplejavamail.email.EmailPopulatingBuilder) OutlookMessage(org.simplejavamail.outlookmessageparser.model.OutlookMessage)

Example 2 with OutlookMessage

use of org.simplejavamail.outlookmessageparser.model.OutlookMessage 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}.
 */
public static EmailPopulatingBuilder outlookMsgToEmailBuilder(@Nonnull final InputStream msgInputStream) {
    final EmailPopulatingBuilder emailPopulatingBuilder = EmailBuilder.ignoringDefaults().startingBlank();
    final OutlookMessage outlookMessage = OutlookMessageParser.parseOutlookMsg(checkNonEmptyArgument(msgInputStream, "msgInputStream"));
    buildEmailFromOutlookMessage(emailPopulatingBuilder, outlookMessage);
    return emailPopulatingBuilder;
}
Also used : EmailPopulatingBuilder(org.simplejavamail.email.EmailPopulatingBuilder) OutlookMessage(org.simplejavamail.outlookmessageparser.model.OutlookMessage)

Example 3 with OutlookMessage

use of org.simplejavamail.outlookmessageparser.model.OutlookMessage in project simple-java-mail by bbottema.

the class EmailConverter method outlookMsgToEmail.

/**
 * @param msgfile The content of an Outlook (.msg) message from which to create the {@link Email}.
 */
public static Email outlookMsgToEmail(@Nonnull final File msgfile) {
    final EmailPopulatingBuilder emailPopulatingBuilder = EmailBuilder.ignoringDefaults().startingBlank();
    final OutlookMessage outlookMessage = OutlookMessageParser.parseOutlookMsg(checkNonEmptyArgument(msgfile, "msgfile"));
    buildEmailFromOutlookMessage(emailPopulatingBuilder, outlookMessage);
    return emailPopulatingBuilder.buildEmail();
}
Also used : EmailPopulatingBuilder(org.simplejavamail.email.EmailPopulatingBuilder) OutlookMessage(org.simplejavamail.outlookmessageparser.model.OutlookMessage)

Aggregations

EmailPopulatingBuilder (org.simplejavamail.email.EmailPopulatingBuilder)3 OutlookMessage (org.simplejavamail.outlookmessageparser.model.OutlookMessage)3