Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multipart emails aren't parsed correctly #2

Open
Exerra opened this issue Mar 25, 2024 · 1 comment
Open

Multipart emails aren't parsed correctly #2

Exerra opened this issue Mar 25, 2024 · 1 comment
Assignees
Labels
bug Something isn't working enhancement New feature or request
Milestone

Comments

@Exerra
Copy link
Owner

Exerra commented Mar 25, 2024

Currently there is no multipart parsing implemented in cf-imap.

Example response:

[
  {
    from: 'REDACTED',
    to: 'REDACTED',
    subject: 'cf-imap tests',
    messageID: 'REDACTED',
    contentType: 'text/plain; charset="UTF-8"',
    date: 2024-03-25T20:31:06.000Z,
    raw: '* 3 FETCH (BODY[TEXT] {1076}\n' +
      '------=_Part_4423909_977359486.1711398666114\n' +
      'Content-Type: text/plain; charset="UTF-8"\n' +
      'Content-Transfer-Encoding: 7bit\n' +
      '\n' +
      'bumbas\n' +
      '\n' +
      '\n' +
      '--\n' +
      '\n' +
      'Exerra (exerra.xyz)\n' +
      '\n' +
      'Full-stack developer.\n' +
      '------=_Part_4423909_977359486.1711398666114\n' +
      'Content-Type: text/html; charset="UTF-8"\n' +
      'Content-Transfer-Encoding: 7bit\n' +
      '\n' +
      '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt;"><div>bumbas</div><div><br></div><div class="zmail_signature_below"><div id="" data-zbluepencil-ignore="true" data-sigid="1646310000000156003"><div><span class="colour" style="color: rgb(153, 153, 153);">--</span><br></div><div><span class="colour" style="color: rgb(153, 153, 153);"><b>Exerra (exerra.xyz)</b><br></span></div><div><span class="colour" style="color: rgb(153, 153, 153);">Full-stack developer.</span><br></div></div></div><div><br>\n' +
      '</div></div><br></body></html>\n' +
      '------=_Part_4423909_977359486.1711398666114--\n' +
      '\n' +
      '\n' +
      ' BODY[HEADER.FIELDS (SUBJECT FROM TO MESSAGE-ID CONTENT-TYPE DATE)] {304}\n' +
      'Date: Mon, 25 Mar 2024 22:31:06 +0200\n' +
      'From: REDACTED\n' +
      'To: REDACTED\n' +
      'Message-Id: REDACTED\n' +
      'Subject: cf-imap tests\n' +
      'Content-Type: multipart/alternative; \n' +
      '\tboundary="----=_Part_4423909_977359486.1711398666114"\n' +
      '\n' +
      ')\n' +
      'A5 OK Fetch completed (0.002 + 0.000 + 0.001 secs).\n',
    body: '* 3 FETCH (BODY[TEXT] {1076}\n' +
      '------=_Part_4423909_977359486.1711398666114\n' +
      'Content-Type: text/plain; charset="UTF-8"\n' +
      'Content-Transfer-Encoding: 7bit\n' +
      '\n' +
      'bumbas\n' +
      '\n' +
      '\n' +
      '--\n' +
      '\n' +
      'Exerra (exerra.xyz)\n' +
      '\n' +
      'Full-stack developer.\n' +
      '------=_Part_4423909_977359486.1711398666114\n' +
      'Content-Type: text/html; charset="UTF-8"\n' +
      'Content-Transfer-Encoding: 7bit\n' +
      '\n' +
      '<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta content="text/html;charset=UTF-8" http-equiv="Content-Type"></head><body ><div style="font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10pt;"><div>bumbas</div><div><br></div><div class="zmail_signature_below"><div id="" data-zbluepencil-ignore="true" data-sigid="1646310000000156003"><div><span class="colour" style="color: rgb(153, 153, 153);">--</span><br></div><div><span class="colour" style="color: rgb(153, 153, 153);"><b>Exerra (exerra.xyz)</b><br></span></div><div><span class="colour" style="color: rgb(153, 153, 153);">Full-stack developer.</span><br></div></div></div><div><br>\n' +
      '</div></div><br></body></html>\n' +
      '------=_Part_4423909_977359486.1711398666114--\n' +
      '\n' +
      '\n' +
      ' BODY[HEADER.FIELDS (SUBJECT FROM TO MESSAGE-ID CONTENT-TYPE DATE)] {304}\n' +
      'Date: Mon, 25 Mar 2024 22:31:06 +0200\n' +
      'From: REDACTED\n' +
      'To: REDACTED\n' +
      'Message-Id: REDACTED\n' +
      'Subject: cf-imap tests\n' +
      'Content-Type: multipart/alternative; \n' +
      '\tboundary="----=_Part_4423909_977359486.1711398666114"'
  }
]
@Exerra Exerra added the enhancement New feature or request label Mar 25, 2024
@Exerra Exerra self-assigned this Mar 25, 2024
@Exerra Exerra added the bug Something isn't working label Mar 25, 2024
@Exerra Exerra changed the title Multibody emails aren't parsed correctly Multipart emails aren't parsed correctly Mar 26, 2024
@Exerra
Copy link
Owner Author

Exerra commented Mar 27, 2024

Edited the message as I was just being dumb and only had multipart emails in my test account. Still, issue persists.

@Exerra Exerra added this to the 1.x.x milestone Mar 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working enhancement New feature or request
Projects
Status: Backlog
Development

No branches or pull requests

1 participant