Skip to content

Data too long for column 'receiver_mail' #1230

@imminger

Description

@imminger

Problem:

An error occurs, when the mail to receiver is sent to many recipients: Data too long for column 'receiver_mail'

The FlexForm field settings.flexform.receiver.email allows more than 255 characters:

<config>
<type>text</type>
<cols>32</cols>
<rows>2</rows>
</config>

However, the database field tx_powermail_domain_model_mail.receiver_mail is limited to 255 characters:

receiver_mail varchar(255) DEFAULT '' NOT NULL,

This leads to an error when a mail is sent to a large number of recipients and the total character count in the receiver email field exceeds 255 characters:
Data too long for column 'receiver_mail'

Reproduction scenario:

Send mail to receiver to many receivers (so string is longer than 255 characters). E.g.:

[email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected], [email protected]
(addresses are fictional)
Image

Proposed solution:

  • Add a character limit to the FlexForm field settings.flexform.receiver.email to prevent user misconfiguration.
  • Alternatively: Extend the database field length (receiver_mail in tx_powermail_domain_model_mail) to support longer strings.

However, note that issue #424 warns against using too many recipients via this field. Therefore, introducing a limit on settings.flexform.receiver.email is likely the best approach.

Affected version:

powermail 12.5.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions