-
-
Notifications
You must be signed in to change notification settings - Fork 278
Closed
Milestone
Description
Code:
public static void main(String[] args) throws IOException {
viewMsg();
viewEml();
}
public static void viewMsg() throws IOException {
Email em1 = EmailConverter.outlookMsgToEmail(new File("Email.msg"));
System.out.println("--------------------------------------------------------");
System.out.println(em1.getSubject());
System.out.println(em1.getAttachments());
System.out.println("--------------------------------------------------------");
}
public static void viewEml() throws IOException {
Email em1 = EmailConverter.emlToEmail(new File("Email.eml"));
System.out.println("--------------------------------------------------------");
System.out.println(em1.getSubject());
System.out.println(em1.getAttachments());
System.out.println("--------------------------------------------------------");
}Expected result:
Email
AttachmentResource
{
name='PHOTO-2020-02-18-07-42-08_1.jpg',
dataSource.name=PHOTO-2020-02-18-07-42-08_1.jpg,
dataSource.getContentType=image/jpeg
},
AttachmentResource{
name='This msg file is an attachment.msg',
dataSource.name=This msg file is an attachment.msg,
dataSource.getContentType=application/octet-stream
}
--------------------------------------------------------
--------------------------------------------------------
Email
AttachmentResource
{
name='PHOTO-2020-02-18-07-42-08_1.jpg',
dataSource.name=PHOTO-2020-02-18-07-42-08_1.jpg,
dataSource.getContentType=image/jpeg
},
AttachmentResource{
name='This msg file is an attachment.msg',
dataSource.name=This msg file is an attachment.msg,
dataSource.getContentType=application/octet-stream
}]
--------------------------------------------------------
Actual result:
Email
AttachmentResource
{
name='PHOTO-2020-02-18-07-42-08_1.jpg',
dataSource.name=PHOTO-2020-02-18-07-42-08_1.jpg,
dataSource.getContentType=image/jpeg
}
--------------------------------------------------------
--------------------------------------------------------
Email
AttachmentResource
{
name='PHOTO-2020-02-18-07-42-08_1.jpg',
dataSource.name=PHOTO-2020-02-18-07-42-08_1.jpg,
dataSource.getContentType=image/jpeg
},
AttachmentResource
{
name='This msg file is an attachment.msg',
dataSource.name=This msg file is an attachment.msg,
dataSource.getContentType=application/octet-stream
}
--------------------------------------------------------