Subject Line Missing from Inbound Emails

This fix doesn’t resolve the problem with the list view only in the detail view. It also propagates the issue into a case if you have a group email setup to create new cases, the load with a blank subject.

@rossm are you running 8.2.4? Does it work well there? I’m asking this because supposedly this went through testing, and what you’re describing would have been spotted. Maybe there are other fixes in that version that will make things work for you.

Also, with UI issues, often there are bits of screens hanging around in caches (plural - there is more than one). So sometimes the fix doesn’t mediatamente take effect. I suggest a few Admin / Repairs and browser hard-refreshes.

I first tested using 7.13 and replaced the displaySubjectField.tpl file with hot fix version. This fixed the issue in the record display but not the list view.

Then I tested using 8.2.4, which didn’t work in either the list or detail view, with or without hot fix.

Then I tried 8.3-beta and still doesn’t work either

I should say I can access the record with no issues, it is just the from field is completely blank and subject says ‘(no subject)’

1 Like

Did you try the Repairs and the Refreshes?

Is the behaviour the same with fresh emails, that arrived after the fix?

I am using SuiteCRM v. 8.2.4

Have it connected to Microsoft Azure | Office 365

Fix #206 (pgr post Feb 28) did not work for me.

Tried browser hard refreshes (Chrome/Firefox) and Admin/Repairs

External OAuth connections and Outbound Email work.

Inbound emails work. Just the subject line is missing per rossm’s screen shot on Apr 7

I was able to fix this with Outlook 365 by modifying InboundEmail.php function handleMimeHeaderDecode($subject) to the following:

    public function handleMimeHeaderDecode($subject)
    {
        $subjectDecoded = $this->getImap()->MimeHeaderDecode($subject);

        $ret = '';

        if (is_array($subjectDecoded)) {
            foreach ($subjectDecoded as $object) {
                if ($object->charset != 'default') {
                    $ret .= $this->handleCharsetTranslation($object->text, $object->charset);
                } else {
                    $ret .= $object->text;
                }
            }
        } else {
            $ret = $subjectDecoded;
        }

        return $ret;
    }

I am still unable to import emails but the data is now there.

2 Likes

Hi, @norrch , welcome to the Community! :tada:

Nice fix, maybe you could create a PR for it on Github?

1 Like

I am not sure, I haven’t been able to determine what the original use was. The code is setup to parse a dictionary, but from what I can see this is only impacting Outlook 365? How is Gmail different? I haven’t tested these alternative scenarios yet.

1 Like

Ok… you’re right to be prudent, this can get really complicated with email and SuiteCRM :sweat_smile:

Then maybe just open an Issue, without the PR, so the devs can take a look at it. Having your fix there helps focus the attention on the relevant bit of code.

Great ! Now i can see subject and from in the list ! Good job!

We must solve this for future releases. @pgr can you create the PR, i dont think it was created.

Thanks

I think I will wait for my other PR’s to be merged before opening new ones…

The problem remains in the email dashlet in v8.4.0-beta.

I applied the patch from @norrch and it fixed the issue. I believe a PR would make sense otherwise email is crippled in v8.4 and we really should have these basics working by now. Here are the before and after pictures.

applying @norrch fix worked for v8.3, v8.4-beta and now v8.4
image

Still not fixed in “upgrade” v.8.4.1.

My recommendation is not to do these “upgrades”. They only wipe out any fixes you’ve made that continue not to be made to the core code. For some reason, nobody appears to be actually using this in the development team because they would not be able to see emails. It is a shame but if you “upgrade” you will actually go backwards. This has carried through every V8 “upgrade” and, this and other similar nuisances, will waste your time or frustrate your clients.

Where is the issue and PR for this on Github?

Hello all,

Is there any way to tag all Suitecrm developer, responsible maintainers and fix all these known issues?

@rsp you create Issues in the GitHub repos, one for v7, one for v8

I found the exact same issue

This helped, thank you very much