Client email history does not load

Hi,
I’m using self-hosted invoiceninja 4.5.11 with postmark.
Emails are sent fine, tracking is also working, but not the history.

Error from log-file:
[2019-03-12 23:39:27] production.ERROR: ErrorException [0] : /home/xy/invoiceninja/app/Jobs/LoadPostmarkHistory.php [Line 72] => count(): Parameter must be an array or an object that implements Countable {“context”:“PHP”,“user_id”:1,“account_id”:1,“user_name”:“xyz”,“method”:“POST”,“user_agent”:“Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:66.0) Gecko/20100101 Firefox/66.0”,“locale”:“en”,“ip”:“xyz”,“count”:2,“is_console”:“no”,“is_api”:“no”,“db_server”:“mysql”,“url”:“email_history”} []

Any idea how to solve this?

Are you using postmark for your email driver? I think this feature requires postmark.

Yes, postmark is set up as explained in the documentation and is sending outbound mail. I can see that mails have been openend in the IN Email report, I also get mail notifications when mails are opened.

From my .env file:
POSTMARK_API_TOKEN=73317dc3-98e3-4080-a747-xxx
MAIL_FROM_ADDRESS=no-reply@xxx
#MAIL_DRIVER=smtp
#MAIL_PORT=587
#MAIL_ENCRYPTION=tls
#MAIL_HOST=xxx
#MAIL_USERNAME=xxx
#MAIL_FROM_NAME=‘xxx’
#MAIL_PASSWORD=xxx

When viewing the activity in the Postmark web site are client emails tagged with your Invoice Ninja account_key

Is the account_key the .env file APP_KEY=xyz entry?
If so, no, the tag listed in postmark’s outbound activity view is different.

You can see it by running this SQL query: select account_key from accounts;