How to use nodemailer in wix?

Have you installed nodemailer through Wix Package Manager if it has it’s own NodeJS available there?
https://support.wix.com/en/article/corvid-managing-external-code-libraries-with-the-package-manager
https://nodemailer.com/usage/
https://www.w3schools.com/nodejs/nodejs_email.asp

You can see if it is available for use on Wix already by checking here.
https://www.wix.com/corvid/npm-modules

According to the list on 21/2/2019 nodemailer-mandrill-transport 1.2.0 was made available.
According to the list on 18/2/2018 nodemailer 4.6.0 was made available.

You will have to request it yourself if that is not what you are looking for and look at using the options below.

Otherwise, you will have to look at using NodeMailers API, if you can have access to it and use either Wix Fetch or Wix HTTP Functions.

See tutorial here about it.
https://www.wix.com/corvid/forum/corvid-tips-and-updates/example-myapi-and-myapiclient

https://www.wix.com/corvid/reference/wix-fetch.html
https://support.wix.com/en/article/corvid-accessing-third-party-services-with-the-fetch-api

https://www.wix.com/corvid/reference/wix-http-functions.html
https://support.wix.com/en/article/corvid-exposing-a-site-api-with-http-functions