forwardemail / email-templates

Create, preview (browser/iOS Simulator), and send custom email templates for Node.js. Made for @forwardemail, @ladjs, @cabinjs, @spamscanner, and @breejs.
https://forwardemail.net/docs/send-emails-with-node-js-javascript
MIT License
3.67k stars 337 forks source link

(node:72191) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc()... #347

Closed xfishernet closed 4 years ago

xfishernet commented 5 years ago

I get an warning immediately after launch this string: const Email = require('email-templates');

warning: (node:72191) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc()...

josepgomes commented 5 years ago

Same here!

RikaXia commented 5 years ago

用Node.js申请缓存buffer报DEP0005错误的解决方法:

before:new Buffer(myBase64Str, 'base64') after:Buffer.from(myBase64Str, 'base64');