Skip to content

[bug] support iCalendar events with METHOD defined in body instead of Content-Type #552

Closed

Description

@IvanPriests

Simple Java Mail currently relies solely on the iCalendar MimePart's Content-Type to determine the METHOD, but this isn't fully spec-compliant. While many email providers include METHOD in the Content-Type for convenience, it's only mandatory in the actual calendar body.

ORIGINAL REPORT:

I received an email that was missing the calendar method, but it was still a calendar email. For my email parser, the specific method is not as important; what matters is that the email was received and its other parameters. However, the parser broke while trying to parse this type of email. I request that you add the ability to disable parsing of calendar content for

example broken email:
brokenMessageEml.txt

Activity

  1. IvanPriests commented on Oct 4, 2024

    @IvanPriests
    Author

    I'm use org.simplejavamail.converter.internal.mimemessage.MimeMessageParser.parseMimeMessage(mimeMessage) for parse email content and headers

  2. added a commit that references this issue on Oct 5, 2024
  3. changed the title [-]Add the flag to disable calendar method parsing[/-] [+][bug] support iCalendar events with METHOD defined in body instead of Content-Type[/+] on Oct 5, 2024
  4. added this to the 8.12.2 milestone on Oct 5, 2024
  5. bbottema commented on Oct 5, 2024

    @bbottema
    Owner

    Thank you for reporting. This is actually a bug and the METHOD should be parsed properly nonetheless. I've fixed this in version 8.12.2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions