-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
76 changed files
with
553 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,3 +8,4 @@ | |
/.cache/ | ||
/qodana.yaml | ||
/todo.txt | ||
!/qodana.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,36 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<buildprofiles xsi:noNamespaceSchemaLocation="https://resources.jetbrains.com/writerside/1.0/build-profiles.xsd" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | ||
<sitemap priority="0.35" change-frequency="monthly"/> | ||
|
||
<variables></variables> | ||
<variables> | ||
<custom-favicons>favico-48.ico</custom-favicons> | ||
<header-logo>logo.png</header-logo> | ||
<download-title>NPM Documentation</download-title> | ||
<download-page>https://www.npmjs.com/package/easy-yopmail</download-page> | ||
<showDownloadButton>true</showDownloadButton> | ||
<primary-color>dracula</primary-color> | ||
</variables> | ||
<build-profile instance="e"> | ||
|
||
<variables> | ||
<noindex-content>true</noindex-content> | ||
<offline-docs>false</offline-docs> | ||
<noindex-content>false</noindex-content> | ||
<offline-docs>true</offline-docs> | ||
</variables> | ||
</build-profile> | ||
<footer> | ||
<copyright>Jasp402 | 2020-2024</copyright> | ||
|
||
<social type="blog" href="link to a blog"></social> | ||
<social type="twitter" href="link to a Twitter account"></social> | ||
<social type="youtube" href="link to a Twitter account"></social> | ||
<social type="linkedin" href="link to a Facebook account"></social> | ||
<social type="email" href="link to a Facebook account"></social> | ||
|
||
<link href="https://slack.example.com">Slack community</link> | ||
<link href="https://stackoverflow.com">StackOverflow</link> | ||
<link href="https://example.com/terms-an-conditions.html">Terms and conditions</link> | ||
<link href="https://example.com/code-of-conduct.html">Code of Conduct</link> | ||
</footer> | ||
|
||
</buildprofiles> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE terms SYSTEM "https://resources.jetbrains.com/writerside/1.0/glossary.dtd"> | ||
<terms> | ||
<term name="GUI">Graphical User Interface</term> | ||
<term name="tooltip">Tooltips show a definition when a user hovers over a term.</term> | ||
<term name="runkit">This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including easy-yopmail.</term> | ||
</terms> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Oops, something went wrong.
Binary file not shown.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE rules SYSTEM "https://resources.jetbrains.com/writerside/1.0/redirection-rules.dtd"> | ||
<rules> | ||
<!-- format is as follows | ||
<rule id="<unique id>"> | ||
<accepts>page.html</accepts> | ||
</rule> | ||
--> | ||
<rule id="7b67b394"> | ||
<description>Created after removal of "Empty XML Topic" from EasyYopmail</description> | ||
<accepts>Empty-XML-Topic.html</accepts> | ||
</rule> | ||
<rule id="21c5a74f"> | ||
<description>Created after removal of "Section Starting Page" from EasyYopmail</description> | ||
<accepts>Section-Starting-Page.html</accepts> | ||
</rule> | ||
</rules> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# 📢 Announcements | ||
|
||
Start typing here... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# 📰 Blog | ||
|
||
Start typing here... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Improvements | ||
|
||
Start typing here... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Sponsors | ||
|
||
Start typing here... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# deleteInbox() | ||
|
||
Start typing here... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# deleteMessage() | ||
|
||
Start typing here... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# getInbox() | ||
|
||
Start typing here... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# getMail() | ||
|
||
Start typing here... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,82 @@ | ||
# 📑 readMessage() | ||
|
||
# Definición | ||
The readMessage() function in Easy-Yopmail allows you to read the content of a specific email within a YOPmail inbox. It provides options to retrieve the content in plain text or HTML format, and even allows you to target specific elements within the email using CSS selectors. | ||
Parámetros de entrada | ||
Parámetro Tipo Descripción | ||
mail String La dirección de correo electrónico YOPmail (sin el dominio @yopmail.com). | ||
id String El ID único del correo electrónico que desea leer. | ||
options Object (Opcional) Un objeto con opciones adicionales para personalizar la lectura. | ||
Opciones dentro del parámetro options: | ||
format: (Opcional) Formato del contenido del correo electrónico. Puede ser "TXT" (texto plano) o "HTML" (HTML). Por defecto es "TXT". | ||
selector: (Opcional) Un selector CSS para apuntar a un elemento específico dentro del cuerpo del correo electrónico HTML. | ||
attribute: (Opcional) Si se proporciona un selector, este parámetro especifica el atributo del elemento que se va a devolver (por ejemplo, "href" para un enlace). | ||
pathToSave: (Opcional) Ruta para guardar el HTML del correo electrónico como un archivo. | ||
Salida | ||
La función readMessage() devuelve una promesa que se resuelve con un objeto que contiene la siguiente información: | ||
id: El ID del correo electrónico. | ||
submit: El asunto del correo electrónico. | ||
from: La dirección de correo electrónico del remitente. | ||
date: La fecha en que se recibió el correo electrónico. | ||
deliverability: Información sobre la entrega del correo electrónico. | ||
format: El formato del contenido devuelto ("TXT" o "HTML"). | ||
selector: El selector CSS utilizado (si se proporciona). | ||
eq: El índice del elemento seleccionado (si se proporciona). | ||
attribute: El atributo del elemento seleccionado (si se proporciona). | ||
pathToSave: La ruta donde se guardó el HTML (si se proporciona). | ||
content: El contenido del correo electrónico en el formato especificado. | ||
info: Una lista de advertencias o mensajes informativos. | ||
Diagrama mermaid | ||
sequenceDiagram | ||
participant NodeJS | ||
participant EasyYopmail | ||
participant Yopmail | ||
NodeJS->>EasyYopmail: readMessage(mail, id, options) | ||
activate EasyYopmail | ||
EasyYopmail->>Yopmail: Request email content by ID | ||
Yopmail->>EasyYopmail: Return email content | ||
deactivate EasyYopmail | ||
NodeJS->>NodeJS: Process email content (format, selector, attribute) | ||
alt pathToSave option provided | ||
NodeJS->>EasyYopmail: Save email HTML to file | ||
activate EasyYopmail | ||
EasyYopmail->>FileSystem: Save HTML content | ||
deactivate EasyYopmail | ||
end | ||
Use code with caution. | ||
Mermaid | ||
Casos de uso prácticos | ||
Leer el contenido de texto plano de un correo electrónico: | ||
easyYopmail.readMessage('mi-correo', 'id-del-correo') | ||
.then(message => { | ||
console.log(message.content); // Contenido del correo en texto plano | ||
}); | ||
Use code with caution. | ||
JavaScript | ||
Extraer un enlace de confirmación de un correo electrónico HTML: | ||
easyYopmail.readMessage('mi-correo', 'id-del-correo', { format: 'HTML', selector: 'a.confirmation-link', attribute: 'href' }) | ||
.then(message => { | ||
console.log(message.content); // URL del enlace de confirmación | ||
}); | ||
Use code with caution. | ||
JavaScript | ||
Guardar el contenido HTML completo de un correo electrónico en un archivo: | ||
easyYopmail.readMessage('mi-correo', 'id-del-correo', { format: 'HTML', pathToSave: './emails' }) | ||
.then(message => { | ||
console.log('Correo electrónico guardado como archivo HTML'); | ||
}); | ||
Use code with caution. | ||
JavaScript | ||
Código de ejemplo | ||
const easyYopmail = require('easy-yopmail'); | ||
|
||
easyYopmail.getInbox('[email protected]') | ||
.then(inbox => { | ||
const emailId = inbox.inbox[0].id; | ||
|
||
easyYopmail.readMessage('[email protected]', emailId, { format: 'HTML' }) | ||
.then(message => { | ||
console.log(message.content); // Contenido del correo electrónico en HTML | ||
}); | ||
}); | ||
Use code with caution. |
Oops, something went wrong.