diff --git a/modules/simple-java-mail/src/main/java/org/simplejavamail/converter/internal/mimemessage/MimeMessageHelper.java b/modules/simple-java-mail/src/main/java/org/simplejavamail/converter/internal/mimemessage/MimeMessageHelper.java index f1345b806..5bd620f8e 100644 --- a/modules/simple-java-mail/src/main/java/org/simplejavamail/converter/internal/mimemessage/MimeMessageHelper.java +++ b/modules/simple-java-mail/src/main/java/org/simplejavamail/converter/internal/mimemessage/MimeMessageHelper.java @@ -238,7 +238,7 @@ private static BodyPart getBodyPartFromDatasource(final AttachmentResource attac final String contentType = attachmentResource.getDataSource().getContentType(); ParameterList pl = new ParameterList(); pl.set("filename", fileName); - pl.set("name", resourceName); + pl.set("name", fileName); attachmentPart.setHeader("Content-Type", contentType + pl.toString()); attachmentPart.setHeader("Content-ID", format("<%s>", resourceName)); attachmentPart.setDisposition(dispositionType);