Organizer Is Missing from Recipients in Meeting Cancellation

Hi, I have noticed an issue whereby the meeting organiser is not included in the “Required” recipients field for a cancellation. Please could you confirm if this could be fixed in the library? Here is a simple test project containing the following test, and the source EML.

Thank you.

missingRecipientTestCase.zip (7.8 KB)
cancellation.zip (3.0 KB)

import org.junit.Assert;
import org.junit.Test;

import com.aspose.email.MailMessage;
import com.aspose.email.MapiMessage;
import com.aspose.email.MapiPropertyTag;

public class MissingRecipient {

    @Test
    public void test() {
        // Given
        MailMessage mailMessage = MailMessage.load("/TODO/" + "cancellation.eml");

        // When
        MapiMessage mapiMessage = MapiMessage.fromMailMessage(mailMessage);

        // Then
        Assert.assertTrue(mapiMessage.getProperties().get_Item(MapiPropertyTag.PR_SENDER_EMAIL_ADDRESS).getString().contains("john.smith@enterprise.net"));
        Assert.assertTrue(mapiMessage.getProperties().get_Item(MapiPropertyTag.PR_DISPLAY_TO).getString().contains("joanna.smithers@enterprise.net"));

        Assert.assertFalse(mapiMessage.getProperties().get_Item(MapiPropertyTag.PR_DISPLAY_TO).getString().contains("john.smith@enterprise.net"));

        mapiMessage.save("/TODO/" + "converted.msg");
    }
}

@curtisyamada,
Thank you for the issue description. I reproduced the problem with the missing email address and logged the issue with ID EMAILJAVA-34953 in our tracking system. Our development team will investigate this case. You will be notified when the problem is resolved.

Thank you for reproducing and logging this swiftly, Andrey.

Hi Andrey, do you have any update on when this fix will be included in a release?

@curtisyamada,

If Appointment MailMessage contains Recipients, Subject, and Body it will be converted to MapiMessage according to these parameters.

If it is necessary to convert EML with ICS options, it is possible to clear Recipients and Subject. For example, in the case of Appointment Cancellation, the code can be as follows.

MailMessage mailMessage = MailMessage.load("cancellation.eml");

boolean isAppointmentCancellation = false;
for (AlternateView view : mailMessage.getAlternateViews()) {
    if ("text/calendar".equalsIgnoreCase(view.getContentType().getMediaType())
            && "CANCEL".equalsIgnoreCase(view.getContentType().getParameters().get_Item("method"))) {
        isAppointmentCancellation = true;
        break;
    }
}

if (isAppointmentCancellation) {
    // load recipients and subject from ICS
    mailMessage.getTo().clear();
    mailMessage.setSubject(null);
}

MapiMessage mapiMessage = MapiMessage.fromMailMessage(mailMessage);

2021-10-21_EMAILJAVA-34953_cancellation_out_res.png (4.5 KB)