Problem/Motivation

When submitting webform entries, emails fail due to a "valid sender email required" error.

[SENDINBLUE]
Error sending email (from Sender Name to submission@example.com
with reply-to Sender Name )
[400] Client error: `POST https://api.sendinblue.com/v3/smtp/email` resulted in a `400 Bad Request` response: {"code":"invalid_parameter","message":"valid sender email required"} ].

Steps to reproduce

Create webform. Add email handler to send email to. This email is listed as being verified on SendInBlue. It seems SendInBlue is not passing the proper entity elements.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

Shane Birley created an issue. See original summary.

chrisbele’s picture

Status: Active » Needs review
Issue tags: +webform
StatusFileSize
new1003 bytes

It turns out that the error occurred when a "From name" was set at the webform email handler. The cause was the formatting of the name combined with the email (Name <email@example.com >), which was not transformed to the appropriate format for the API call.

I created a patch which handles that use case and solves the issue.

chrisbele’s picture

It turns out that the error occurred when a "From name" was set at the webform email handler. The cause was the formatting of the name combined with the email (Name <email@example.com>), which was not transformed to the appropriate format for the API call.

I created a patch which handles that use case and solves the issue.

chrisbele’s picture

ilya.no’s picture

Version: 8.x-1.8 » 8.x-2.0
Category: Support request » Bug report
StatusFileSize
new1.51 KB
new1.7 KB

Thanks for the patch. I've tried it, but for error also for reply-to field, so I've updated your code and added separate function.

mayaslatinek’s picture

Tested the patch. It fixed the error.
Had that issue with the commerce order receipt.

mayaslatinek’s picture

Status: Needs review » Reviewed & tested by the community