Recipient name missing in "To" field when sending emails (raw email headers)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jhack_jos
    Junior Member
    • Apr 2025
    • 1

    Recipient name missing in "To" field when sending emails (raw email headers)

    Thank you in advance for your consideration.

    Issue:
    We’re experiencing an issue when sending emails via SMTP (we’re using Gmail as the mail server, with the Google Integration Extension). Here’s an example of the email headers:

    Code:
    From: Company Name <noreply@company.com>
    To: customer@example.com
    The From field is correctly formatted with the company name, but the To field only shows the email address of the recipient, without their full name (e.g., it should be “Mario Rossi <customer@example.com>”).
    The full name of the contact is present in EspoCRM, but it’s not included in the message header.

    This becomes a problem because we use Gmail’s sent folder for archiving and searching, and Gmail doesn’t allow us to search by the contact’s name unless it’s explicitly included in the To field. Not all our team is using EspoCRM, so we need to keep being able to find customers by name also in the Gmail app.

    For clarity I also send the full anonymized raw email headers mentioned above below:

    Code:
    Return-Path: <noreply@company.com>
    Received: from mailhost (mail.provider.com. [XXX.XXX.XXX.XXX])
    by smtp.example.com with ESMTPSA id XXXXXXXXXXXXXXXX.XXX.2025.04.21.10.19.04
    for <customer@example.com>
    (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
    Mon, 21 Apr 2025 10:19:04 -0700 (PDT)
    Date: Mon, 21 Apr 2025 17:19:03 +0000
    From: Company Name <noreply@company.com>
    To: customer@example.com
    Subject: TEST
    MIME-Version: 1.0
    Content-Type: multipart/alternative; boundary="=_random_boundary_string"
    Message-ID: <Entity/xxxxxxxxxxxxxxxx/1234567890/0001@crm>
    
    --=_random_boundary_string
    Content-Type: text/plain; charset=utf-8
    Content-Transfer-Encoding: quoted-printable
    
    TEST
    --=_random_boundary_string
    Content-Type: text/html; charset=utf-8
    Content-Transfer-Encoding: quoted-printable
    
    <p>TEST</p>
    --=_random_boundary_string--
    Request:
    Would it be possible to have EspoCRM include the contact’s name in the To field if it’s available in the contact record?
    For example:

    To: Mario Rossi <customer@example.com>
    This small change would greatly improve email traceability and usability in Gmail and other email servers.

    Thanks in advance!
    Jacopo​
  • yuri
    Member
    • Mar 2014
    • 8886

    #2
    Hi Jacopo,

    We will look into this problem. But it can take some time. Unlikely in the next release. There's the problem that one might not will to expose the name a contact is given in the CRM with the recipient.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment

    • yuri
      Member
      • Mar 2014
      • 8886

      #3
      IFAIK it's a normal practice not to include the contact name in the To header.

      > This small change..

      Unfortunately, it's not not a small change. Email Address, Leads, Contact, Account are all different entities. Now we deal only with addresses. Adding a person/company record may require a lot of effort.
      Last edited by yuri; Today, 06:49 AM.
      If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

      Comment

      Working...