RocketChat / Rocket.Chat

The communications platform that puts data protection first.
https://rocket.chat/
Other
40.49k stars 10.55k forks source link

Omnichannel email content is empty and does not show up in Chat #27928

Open jwnga opened 1 year ago

jwnga commented 1 year ago

Description:

When sending emails to configured inbox. Email is converted to Chat message but content of email is not show in chat. There is no different if i will send html email or plain text email.

Steps to reproduce:

  1. Setup Email Inbox
  2. Send test email to configured inbox

Expected behavior:

I was expecting to see content of email that im sending.

Actual behavior:

Content of email is not visible

Server Setup Information:

Client Setup Information

Additional context

image

teach404W commented 1 year ago

+1

Potemkinkuliss commented 1 year ago

+1

Rocket.Chat Version: 6.2.2 NodeJS Version: 14.21.3 - x64 MongoDB Version: 4.4.15 MongoDB Engine: wiredTiger Platform: linux

Vladlysenko75 commented 1 year ago

+1

Rocket.Chat Version: 6.2.3 NodeJS Version: 14.21.3 - x64 MongoDB Version: 6.0.3
MongoDB Engine: wiredTiger
Platform: darwin

sebastian-de commented 8 months ago

I don't know TS, so I have a hard time debugging this.

What I tried was setting up a dev instance develop and create an email inbox.

I put logger.info(JSON.stringify(email)); here.

It seems that email.text is undefined and email.html is false. So something in ParsedEmail or simpleparser seems to have changed.

The complete email object looks like this:

{
  "attachments": [],
  "headers": {},
  "headerLines": [
    {
      "key": "return-path",
      "line": "Return-Path: <user1@mailerdomain.com>"
    },
    {
      "key": "delivered-to",
      "line": "Delivered-To: user2@example.com"
    },
    {
      "key": "received",
      "line": "Received: from mail.mailerdomain.com\r\n\tby mail.mailerdomain.com with LMTP\r\n\tid WchkFtQi5GUKCAAAkJPkPg\r\n\t(envelope-from <user1@mailerdomain.com>)\r\n\tfor <user2@example.com>; Sun, 03 Mar 2024 08:12:20 +0100"
    },
    {
      "key": "x-original-to",
      "line": "X-Original-To: user2@example.com"
    },
    {
      "key": "message-id",
      "line": "Message-ID: <a0a5c52c-142a-4f7a-a98a-9cb94a113dc9@mailerdomain.com>"
    },
    {
      "key": "date",
      "line": "Date: Sun, 3 Mar 2024 08:12:18 +0100"
    },
    {
      "key": "mime-version",
      "line": "MIME-Version: 1.0"
    },
    {
      "key": "subject",
      "line": "Subject: Re: A New Hope"
    },
    {
      "key": "content-language",
      "line": "Content-Language: en-US"
    },
    {
      "key": "to",
      "line": "To: mailbox <user2@example.com>"
    },
    {
      "key": "references",
      "line": "References: <82ec59ab-9796-4ae6-aa23-0ff9a829c9a3@mailerdomain.com>\r\n <7f91dd5f-ba62-f5b2-831c-cea6cd5cf69b@example.com>"
    },
    {
      "key": "from",
      "line": "From: user1 <user1@mailerdomain.com>"
    },
    {
      "key": "in-reply-to",
      "line": "In-Reply-To: <7f91dd5f-ba62-f5b2-831c-cea6cd5cf69b@example.com>"
    },
    {
      "key": "content-type",
      "line": "Content-Type: text/plain; charset=UTF-8; format=flowed"
    },
    {
      "key": "content-transfer-encoding",
      "line": "Content-Transfer-Encoding: 7bit"
    }
  ],
  "subject": "Re: A New Hope",
  "references": [
    "<82ec59ab-9796-4ae6-aa23-0ff9a829c9a3@mailerdomain.com>",
    "<7f91dd5f-ba62-f5b2-831c-cea6cd5cf69b@example.com>"
  ],
  "date": "2024-03-03T07:12:18.000Z",
  "to": {
    "value": [
      {
        "address": "user2@example.com",
        "name": "mailbox"
      }
    ],
    "html": "<span class=\"mp_address_group\"><span class=\"mp_address_name\">mailbox</span> &lt;<a href=\"mailto:user2@example.com\" class=\"mp_address_email\">user2@example.com</a>&gt;</span>",
    "text": "\"mailbox\" <user2@example.com>"
  },
  "from": {
    "value": [
      {
        "address": "user1@mailerdomain.com",
        "name": "user1"
      }
    ],
    "html": "<span class=\"mp_address_group\"><span class=\"mp_address_name\">user1</span> &lt;<a href=\"mailto:user1@mailerdomain.com\" class=\"mp_address_email\">user1@mailerdomain.com</a>&gt;</span>",
    "text": "\"user1\" <user1@mailerdomain.com>"
  },
  "messageId": "<a0a5c52c-142a-4f7a-a98a-9cb94a113dc9@mailerdomain.com>",
  "inReplyTo": "<7f91dd5f-ba62-f5b2-831c-cea6cd5cf69b@example.com>",
  "html": false
}

The email body seems to get lost somewhere.

jimisens commented 2 months ago

Hi, same problem here. Has anyone found a solution / workaround ? Rocket.Chat Version: 6.11.1 NodeJS Version: 14.21.3 - x64 MongoDB Version: 5.0.24 MongoDB Engine: wiredTiger Platform: linux