Skip to content

Compose Mail with attachContent error data too long for DB #41

Description

@wisaruthk

I have use function attachContent to attach pdf content. And got Data too long for column.
Database: MySql

$cmd = Yii::$app->mailer->compose()->setFrom()->setTo()->setSubject();

$cmd->attachContent($attachContent,["fileName"=>"name.pdf"]);

$cmd->queue();

SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'swift_message' at row 1

For workaround I have change the column swift_message from text to long text.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions