> For the complete documentation index, see [llms.txt](https://jasp402.gitbook.io/easy-yopmail/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jasp402.gitbook.io/easy-yopmail/es/methods/mails/get-mail.md).

# ⚙️ getMail()

Esta función permite obtener un correo temporal

> ### easyYOPmail.getMail()

{% tabs %}
{% tab title="parámetros" %}

|    Título    | Tipo | Descripción |
| :----------: | ---- | ----------- |
|       -      | -    | -           |
| {% endtab %} |      |             |

{% tab title="Respuesta" %}

| Título        | Tipo     | Descripción     |
| ------------- | -------- | --------------- |
| mail          | `string` | Correo generado |
| {% endtab %}  |          |                 |
| {% endtabs %} |          |                 |

{% hint style="success" %}
NO requiere parámetros
{% endhint %}

## Ejemplos

```javascript
const easyYOPmail = require('easy-yopmail');

easyYOPmail.getMail().then(mail => {
	console.log(mail); //YourMail@yopmail.com
});
```

{% hint style="warning" %}
NOTA: para obtener el resultado se hace uso de [.then()](https://developer.mozilla.org/es/docs/Web/JavaScript/Reference/Global_Objects/Promise/then)
{% endhint %}
