Skip to content

Wrong order of message appending #7

@marwain91

Description

@marwain91

The SendGridTransport.php:113 is appending the e-mail body in incorrect order:

        if (!empty($message->getBodyHtml())) {
            $this->_reqParams['content'][] = (object)[
                'type' => 'text/html',
                'value' => trim($message->getBodyHtml()),
            ];
        }
        if ($emailFormat == 'both' || $emailFormat == 'text') {
            $this->_reqParams['content'][] = (object)[
                'type' => 'text/plain',
                'value' => trim($message->getBodyText()),
            ];
        }

This throws an error when using $this->setEmailFormat('both'); as SendGrid expects the text/plain format before the text/html one.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions