Hi All,
Nodemailer has a dependency for Punycode which is currently an unsupported module in Realm Functions as mentioned in this article, and is likely the cause of the error.
Realm functions do not support the following built-in modules:
child_processclusterdomainpunycodereadlinev8vm
Our team is looking to provide Punycode support at some point in the future, however we do recommend using a service such as AWS SES for sending out emails. This will be a more reliable alternative especially if you are sending with high frequency/volume.
Regards
Manny