Closed
Description
Hi,
We are using SES to send our emails and it is working fine. However, there is one particular scenario where sending would just not work. It is when we use following "Source":
$from = 'foo@bar.com';
$name = 'Encuesta "Mejora del Desempeño del Agente de Servicio"';
// ^ ^ ^
// first quote special character second quote
$source = mb_encode_mimeheader($name) . " <{$from}>";
Trying to send an email will return following error from AWS:
Error executing "SendEmail" on "https://email.eu-west-1.amazonaws.com"; AWS HTTP error: Client error: `POST https://email.eu-west-1.amazonaws.com` resulted in a `400 Bad Request` response:
<ErrorResponse xmlns="http://ses.amazonaws.com/doc/2010-12-01/">
<Error>
<Type>Sender</Type>
<Code>InvalidPara (truncated...)
InvalidParameterValue (client): Missing '"' - <ErrorResponse xmlns="http://ses.amazonaws.com/doc/2010-12-01/">
<Error>
<Type>Sender</Type>
<Code>InvalidParameterValue</Code>
<Message>Missing '"'</Message>
</Error>
<RequestId>5f791426-f927-11e6-a07e-2d6929f5e69d</RequestId>
</ErrorResponse>
AWS Request ID: 5f791426-f927-11e6-a07e-2d6929f5e69d
The problem seems to be that $source
evaluates to this:
Encuesta "Mejora del =?UTF-8?B?RGVzZW1wZcOxbyBkZWwgQWdlbnRlIGRlIFNlcnZp?= =?UTF-8?B?Y2lvIg==?= <foo@bar.com>
The part before the ñ is not being encoded, while everything afterwards is. Because of this, the first quote is still there, but the second quote is gone (encoded).
Is this a bug on AWS' side? Or can we solve this somehow?
Best,
Lionel
Metadata
Metadata
Assignees
Labels
No labels