Mirakurun / aws-lambda-ses-s3-email-forwarder

A Node.js Lambda function that utilizes Amazon SES to forward incoming emails to an email address inbox. Setup Amazon SES to receive emails and deliver to a S3 bucket, then invoke lambda to forward the email to your email of choice.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature: Charset decoding with node-iconv

Mirakurun opened this issue · comments

"Charset decoding is handled using iconv-lite, except for ISO-2022-JP and EUCJP that are handled by encoding-japanese. Alternatively you can use node-iconv module instead for all charset decoding."

const { Iconv } = require('iconv');
const { simpleParser } = require('mailparser');
simpleParser('rfc822 message', { Iconv }, callback);

I will integrate this once I get a better computer to install Docker to spin up a Linux container. Iconv will not compile on a Windows machine. AWS Lambda runs on Linux.

See https://github.com/nodejs/node-gyp#installation

sudo npm install -g node-gyp
sudo apt install make
sudo apt install build-essential
npm i iconv