Skip to content

Commit 0bba795

Browse files
committed
#201: Fixed bug where Outlook FROM name is empty, in which case Email should be filled with "[email protected]"
1 parent 2f5c997 commit 0bba795

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

modules/outlook-module/src/main/java/org/simplejavamail/internal/outlooksupport/converter/OutlookEmailConverter.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,8 @@ public EmailPopulatingBuilder outlookMsgToEmailBuilder(@Nonnull InputStream msgI
4545
private static EmailPopulatingBuilder buildEmailFromOutlookMessage(@Nonnull final EmailPopulatingBuilder builder, @Nonnull final OutlookMessage outlookMessage) {
4646
checkNonEmptyArgument(builder, "emailBuilder");
4747
checkNonEmptyArgument(outlookMessage, "outlookMessage");
48-
builder.from(outlookMessage.getFromName(), outlookMessage.getFromEmail());
48+
String fromEmail = ofNullable(outlookMessage.getFromEmail()).orElse("[email protected]");
49+
builder.from(outlookMessage.getFromName(), fromEmail);
4950
if (!MiscUtil.valueNullOrEmpty(outlookMessage.getReplyToEmail())) {
5051
builder.withReplyTo(outlookMessage.getReplyToName(), outlookMessage.getReplyToEmail());
5152
}

0 commit comments

Comments
 (0)