> For the complete documentation index, see [llms.txt](https://skyslit.gitbook.io/magicjs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://skyslit.gitbook.io/magicjs/api-references/backend/utils/initiateemailverification.md).

# initiateEmailVerification()

This function is crucial for sending OTP verification emails, enhancing user security by delivering dynamic and time-sensitive authentication codes. Its versatility extends to diverse applications, ensuring a reliable and secure means of user identity confirmation.

> Here's an example:

```typescript
import { createBackendFunction, utils } from "@magicjs.dev/backend";

export default createBackendFunction(async function () {
    await utils.initiateEmailVerification("user@gmail.com", 1102); // recipient email, OTP
    return "OTP Sent!";
});
```

{% hint style="danger" %}
The proper functioning of `initiateEmailVerification()` necessitates an active subscription with [mern.ai](https://mern.ai/).&#x20;

Without a valid subscription, the functionality may not perform as intended. Ensure that you have the requisite subscription in place to enable seamless email verification initiation.
{% endhint %}

[Click here to refer GitHub.](https://github.com/skyslit/magicjs.dev/blob/main/packages/backend/src/utils.ts#L56)
