Node.js going back from EC2, can't you email me?

Asked 2 years ago, Updated 2 years ago, 43 views

emailSending an email to module continues to fail with ec2 only.

events.js:141
      throw er; // Unhandled 'error' event
      ^

Error: spawn sendmail ENOENT
    at exports._errnoException (util.js:870:11)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:178:32)
    at onErrorNT (internal/child_process.js:344:16)
    at nextTickCallbackWith2Args (node.js:437:9)
    at process._tickDomainCallback (node.js:392:17)

I think it might be a problem with ec2 because there is no problem when testing at local, but is there any restriction related to ec2?

aws node.js

2022-09-22 14:59

2 Answers

Check the following in the EC2 instance:

https://docs.aws.amazon.com/ko_kr/ses/latest/DeveloperGuide/sendmail.html You may want to refer to this document.

See English documents


2022-09-22 14:59

You may also use email delivery services such as sendgrid.com or mailgun.com. There are about 10,000 e-mails a month that can be sent free of charge, and you can see stable statistics. There is also a library for node.js, so you can use it comfortably.


2022-09-22 14:59

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.