Bug report
Title
Inbound email import crashes when message_id is missing
Issue Description
Incoming emails may not appear in the CRM inbox even when SMTP and IMAP are configured correctly.
In my test, the email was delivered to the mailbox and readable via IMAP, but Krayin failed while importing it.
The issue seems to happen when an email does not expose a parsed message_id attribute.
Preconditions
- Krayin CRM with IMAP enabled.
MAIL_RECEIVER_DRIVER=webklex-imap
- SMTP/IMAP configured and reachable.
Steps to reproduce
- Configure SMTP and IMAP.
- Deliver an email to the configured mailbox.
- Run:
php artisan inbound-emails:process
Expected result
Emails should be imported and displayed in the CRM inbox.
Emails without message_id should be skipped or handled safely.
Actual result
The import crashes with:
Undefined array key "message_id"
Problematic code:
$messageId = $attributes['message_id']->first();
As a result, the inbox is not updated.
Bug report
Title
Inbound email import crashes when
message_idis missingIssue Description
Incoming emails may not appear in the CRM inbox even when SMTP and IMAP are configured correctly.
In my test, the email was delivered to the mailbox and readable via IMAP, but Krayin failed while importing it.
The issue seems to happen when an email does not expose a parsed
message_idattribute.Preconditions
MAIL_RECEIVER_DRIVER=webklex-imapSteps to reproduce
Expected result
Emails should be imported and displayed in the CRM inbox.
Emails without message_id should be skipped or handled safely.
Actual result
The import crashes with:
Undefined array key "message_id"
Problematic code:
$messageId = $attributes['message_id']->first();As a result, the inbox is not updated.