papnkukn / eml-format

RFC 822 EML file format parser and builder
MIT License
88 stars 53 forks source link

Pass empty email address #17

Open ak-08 opened 4 years ago

ak-08 commented 4 years ago

Can we pass empty email addresses?

Use-case: We want to be able to pass null as part of to.email to allow users to manually add email addresses.

AmeerSalahinnova commented 4 years ago

same here

AmeerSalahinnova commented 4 years ago

@ak-08 you can make this after get eml result just do this:

emlformat.build(emlBuilder.creatEmlData(), (e, eml) => {
                            if (e) {
                                this.logger.exception(`emlformat failed`, e);
                                this.sendJson(res, 500, e.message);
                                return;
                            }
                                eml = eml.replace("<non@reply.com>", "");

}