When sending emails, I get this error message.
GuzzleHttp\Exception\ClientException: Client error:
POST https://graph.microsoft.com/v1.0/users/<user>/sendmailresulted in a400 Bad Requestresponse:{"error":{"code":"RequestBodyRead","message":"The property 'address' does not exist on type 'microsoft.graph.recipient'. Make sure to only use property names that are defined by the type or mark the type as open type."}}in GuzzleHttp\Exception\RequestException::create() (line 113 of /opt/drupal/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php).
splitAddresses() does not correctly build the array structure ("toRecipients": [{"address": "<email>", "name": "<recipient name>"}]).
I have never created a patch so hopefully I did it right.
| Comment | File | Size | Author |
|---|---|---|---|
| graph_mail-fix_email_addresses.patch | 468 bytes | TobyLeduc |
Issue fork graph_mail-3416600
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
avpadernoComment #7
avpadernoThank you for finding out what the problem was and providing a patch!
The change is correct. It is the same data structure the code was already using for the from value (with the exception that name is not set).
Comment #9
avpaderno