Error decoding body message of email received in SES AWS
I work with AWS Simple Email Service (SES) to receive emails to an email account and notify them with SNS to a lambda function, SNS encodes the message in base64 and sends the event to my nodejs lambda function, there it is decoded the message from base64 but the content of the message has decoding problems with accents, for example if I send "Nicolás", the email message shows "Nicol = E1s", interpreting the "á" as "= E1".
Attach some image of my rule set in SES and the code of for process my event message
const message = JSON.parse(event.Records[0].Sns.Message);
const base64 = message.content;
const buff = Buffer.from(base64, 'base64');
const bodyMessage = buff.toString();
This only happens when receiving emails, I tried to decode the string to utf-8 but it didn't work, it didn't work either to apply an ASCII decoder, if you require more information I can send it to you
from Recent Questions - Stack Overflow https://ift.tt/2S2aJv9
https://ift.tt/3j46ifn
Comments
Post a Comment