Skip to content

Metadata in Message Body #80

@vpashovski

Description

@vpashovski

When an email body is saved database it contains metadata to it - Subject, To, From etc.
When email is resend, this data is in the body.

In \Experius\EmailCatcher\Model\Emailcatcher::saveMessage there is a usage of

$body = $message->getRawMessage();

This returns string like this:

 """
Subject: Thanks for your order!
To: Test Test <[email protected]>
From: Test <[email protected]>
MIME-Version: 1.0
Date: Fri, 28 Nov 2025 14:02:24 +0000
Message-ID: <[email protected]>
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional //EN" "http://www=
.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns=3D"http://www.w3.org/1999/xhtml" xmlns:v=3D"urn:schemas-microso=
ft-com:vml" xmlns:o=3D"urn:schemas-microsoft-com:office:office">

And this is saved as body in the database.

I'm using Magento 2.4.8-p3 and 4.4.1 version of the module.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions