Hello,
I’m trying to send email verifications using cloud functions when a user wants to register or log in and has not verified his email yet. No email verification is being sent(not in the spam folder either) and I’m also not getting any errors in the console.
Moralis.Cloud.define("sendVerification", async (request) => {
await Moralis.User.requestEmailVerification(request.user.get("email"))
.then(() => {
console.log("Successfully sent verification email");
})
.catch((error) => {
alert("Error: " + error.code + " " + error.message);
});
});
I’m calling the cloud function like this: await Moralis.Cloud.run("sendVerification", {});
What should I do to make it work? is there anything that I’m doing wrong?
Thanks in advance!