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!