Skip to content

Commit

Permalink
version 5.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
jasp402 committed May 17, 2024
1 parent 0885716 commit 7e59db8
Show file tree
Hide file tree
Showing 14 changed files with 124 additions and 103 deletions.
110 changes: 66 additions & 44 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,71 +1,76 @@
# 📮 Easy-YOPMail v4
# 📮 Easy-YOPMail v5.0

<p align="center">
<a href="#">
<img alt="easy-yopmail" src="https://culqi-images-storage.s3.us-east-2.amazonaws.com/images/v4_EN_us.png" width="auto">
<img alt="easy-yopmail" src="https://jasp402.github.io/Easy-YOPmail/images/Easy-YOPmail_title.png" width="auto">
</a>
</p>

<p align="center">
<a href="https://www.npmjs.com/package/easy-yopmail">
<img alt="npm" src="https://img.shields.io/npm/v/easy-yopmail.svg?logo=npm">
<a href="https://github.com/jasp402/Easy-YOPmail/actions/workflows/npm-publish.yml">
<img alt="npm" src="https://github.com/jasp402/Easy-YOPmail/actions/workflows/npm-publish.yml/badge.svg">
</a>
<a href="https://app.travis-ci.com/github/jasp402/Easy-YOPmail">
<img alt="Travis (.org)" src="https://api.travis-ci.com/jasp402/Easy-YOPmail.svg">
<a href="https://github.com/jasp402/Easy-YOPmail/actions/workflows/main.yml">
<img alt="Documentation" src="https://github.com/jasp402/Easy-YOPmail/actions/workflows/main.yml/badge.svg?branch=main">
</a>
<img alt="NPM Unpacked Size" src="https://img.shields.io/npm/unpacked-size/easy-yopmail">
<br/>
<a href="https://sonarcloud.io/summary/new_code?id=jasp402_Easy-YOPmail">
<img alt="SonarCloud" src="https://sonarcloud.io/images/project_badges/sonarcloud-white.svg">
</a>
</p>


---
## 💌 What is Easy-YOPmail?
a powerful NPM library designed for NodeJS. This tool was born from the need to simplify the generation of random emails, the management of inboxes and the reading of received messages, all without the need to manually interact with any web interface.

Easy-Yopmail is based on the YOPmail platform and operates completely asynchronously. Its intuitive design and efficiency make it an indispensable tool for scraping, automated testing, and any process that requires efficient email management.
With Easy-Yopmail, you can focus on what really matters: developing your application. Let our bookstore take care of the email for you.
## 💌 Introducing Easy-YOPmail v5.0: Effortless Temporary Email Management for Node.js
Easy-YOPmail is a powerful Node.js library designed to simplify the way you interact with temporary email addresses from the YOPmail service. This version brings enhanced functionality, improved performance, and an even more intuitive developer experience.

Join the community of developers who are already taking advantage of Easy-Yopmail. Install it today from NPM and see how it can simplify your workflow!
**Easy-YOPmail v5.0 empowers you to:**

<hr>
- **Generate Random Emails:** Create unique and disposable email addresses instantly.
- **Manage Inboxes:** Access, read, and delete emails from any YOPmail inbox.
- **Target Specific Content:** Extract data from emails using CSS selectors and attributes.
- **Automate Workflows:** Effortlessly integrate temporary email management into your scripts and applications.

#### The main features of Easy-Yopmail include:
**Why Choose Easy-YOPmail?**

- **Random Email Generation:** Create unique and random email addresses with a single command.
- **Simplicity:** Intuitive API for seamless integration into your Node.js projects.
- **Efficiency:** Asynchronous operations for fast and responsive email handling.
- **Flexibility:** Customize email retrieval and content extraction with powerful options.
- **Reliability:** Built on the robust YOPmail platform, ensuring consistent performance.

- **Inbox Management:** Access and list the inbox of any Yopmail email address.
## 🚀 Getting Started

- **Reading Emails:** Read received emails without having to interact with any web interface.
1. **Install Easy-YOPmail:**

- **Asynchronous Operation:** All Easy-Yopmail functions run asynchronously, allowing for a seamless workflow.
```bash
npm i easy-yopmail
```

- **Easy Integration with NodeJS:** As an NPM library, Easy-Yopmail integrates seamlessly with any NodeJS project.
2. **Import the library:**

- **Based on YOPmail**: Easy-Yopmail uses the YOPmail platform, which guarantees the reliability and efficiency of its functions.
```javascript
const easyYopmail = require('easy-yopmail');
```

## 📦 Install
You can install the library using [NPM](https://www.npmjs.com/) or [Yarm](https://yarnpkg.com/)
```
npm i easy-yopmail
```
```
yarn add easy-yopmail
```
https://github.com/jasp402/Easy-YOPmail/assets/8978470/775b0b6d-2c83-4bc5-856b-cfb4b58ed247
3. **Explore the examples below and the [full documentation](https://jasp402.github.io/Easy-YOPmail/starter-topic.html)** to harness the power of Easy-YOPmail!

## 🔧 How to use
## 💡 Common Use Cases

``` js
//Declare module
const easyYOPmail = require('easy-yopmail');
```
- **Automated Testing:** Create temporary email addresses for testing user registration, password resets, and other email-dependent features.
- **Web Scraping:** Bypass email verification requirements on websites and collect data efficiently.
- **Anonymous Sign-Ups:** Sign up for services without revealing your primary email address.
- **Notification Systems:** Send automated notifications or alerts using disposable YOPmail addresses.

#### ✉️ *Receive a new email dynamically*
``` js
easyYOPmail.getMail().then(mail => {
console.log(mail);
//Output:
//jemuzivutro-3233@yopmail.com
## ✉️ Example: Generating a Temporary Email

```javascript
easyYopmail.getMail().then(email => {
console.log(email);
// Output: [randomly generated name]@yopmail.com
});
```

#### 🗃️ *Read inbox of an email*
## 🗃️ Example: Reading the inbox of an email
``` js
easyYOPmail.getInbox('testing_01').then(inbox => {
console.log(inbox);
Expand All @@ -88,7 +93,7 @@ easyYOPmail.getInbox('testing_01').then(inbox => {
//}
});
```
#### 📑 *Read message*
## 📑 Example: *Read a message*
``` js
easyYOPmail.readMessage('testing_01', 'e_ZwZjAGVlZGHlZQR1ZQNjAwZ5AQp4ZD==', 'TXT').then(message => {
console.log(message);
Expand All @@ -105,4 +110,21 @@ easyYOPmail.readMessage('testing_01', 'e_ZwZjAGVlZGHlZQR1ZQNjAwZ5AQp4ZD==', 'TXT
});
```
> ⚠️ **NOTE:** For more details visit the full documentation at: https://jasp402.gitbook.io/easy-yopmail-v4
## 💖 Supporting Easy-YOPMail
We deeply appreciate your interest in supporting Easy-YOPmail! Your sponsorship helps us maintain and enhance the library, bringing valuable features and improvements to the community.
Here are a few ways you can contribute:
**1. Financial Support:**
- **Patreon:** Join our community on Patreon and get exclusive benefits! [https://www.patreon.com/patreon.com/jasp402](https://www.patreon.com/patreon.com/jasp402)
- **Buy Me a Coffee:** Fuel our coding sessions with a quick coffee! [https://buymeacoffee.com/wjton2s](https://buymeacoffee.com/wjton2s)
- **Ko-fi:** Show your support with a one-time donation. [https://ko-fi.com/jasp402](https://ko-fi.com/jasp402)
**2. Show Your Love on GitHub:**
- **Star the Repository:** Give us a star on GitHub to show your appreciation and help increase visibility. [Link to your GitHub repository](link-to-your-GitHub-repository)
- **GitHub Sponsors:** Become a sponsor through GitHub Sponsors and directly contribute to the project's development. [Link to your GitHub Sponsors profile](link-to-your-GitHub-Sponsors-profile)
Every contribution, big or small, helps us immensely. We are incredibly grateful for your support!
18 changes: 8 additions & 10 deletions Writerside/cfg/buildprofiles.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
<sitemap priority="0.35" change-frequency="monthly"/>

<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>
Expand All @@ -21,16 +20,15 @@
<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>
<social type="blog" href="https://medium.com/@jasp402"></social>
<social type="twitter" href="https://x.com/jasp402"></social>
<social type="youtube" href="https://www.youtube.com/@jasp402"></social>
<social type="linkedin" href="https://www.linkedin.com/in/jasp402/"></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>
<link href="https://jasp402.com/">About the Author</link>
<link href="https://stackoverflow.com/users/5420562/jasp402">StackOverflow</link>
<link href="#">Terms and conditions</link>
<link href="#">Code of Conduct</link>
</footer>

</buildprofiles>
2 changes: 1 addition & 1 deletion Writerside/e.tree
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
<toc-element topic="writeMessage.md"/>
<toc-element topic="deleteMessage.md"/>
</toc-element>
<toc-element topic="Improvements.md"/>
<toc-element toc-title="Latest News">
<toc-element topic="Announcements.md"/>
<toc-element topic="Blog.md"/>
</toc-element>
<toc-element topic="Improvements.md"/>
<toc-element topic="Sponsors.md"/>
</instance-profile>
2 changes: 1 addition & 1 deletion Writerside/topics/Improvements.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 🙌 Contributing
### Suggesting Improvements

### Suggesting Improvements
We believe in the power of community collaboration to make Easy-YOPMail even better! We welcome your ideas and suggestions for improvements. Here's how you can contribute:

**1. Open an Issue:**
Expand Down
3 changes: 2 additions & 1 deletion Writerside/topics/Sponsors.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# 💖 Supporting Easy-YOPMail: Become a Sponsor
# 💖 Supporting

#### Become a Sponsor
We deeply appreciate your interest in supporting Easy-YOPMail! Your sponsorship helps us maintain and enhance the library, bringing valuable features and improvements to the community.

Here are a few ways you can contribute:
Expand Down
6 changes: 6 additions & 0 deletions Writerside/topics/deleteInbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

The `deleteInbox()` function in the Easy-YOPMail library provides a simple and efficient way to completely erase all emails within a specified YOPmail inbox. This function is especially useful when you need to clean up a temporary email address after its intended use, ensuring privacy and avoiding clutter.

## Input Parameters

| Parameter | Type | Description | Optional |
|---|---|---|---|
| `mail` | String | The YOPmail email address (without the @yopmail.com domain). | No |

## Purpose

The main purpose of `deleteInbox()` is to provide a programmatic way to clear out all messages from a YOPmail inbox. This is beneficial for several reasons:
Expand Down
7 changes: 7 additions & 0 deletions Writerside/topics/deleteMessage.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

The `deleteMessage()` function within the Easy-YOPMail library empowers developers to selectively remove individual emails from a YOPmail inbox. This function is valuable when you need to remove specific messages while retaining others, offering a more granular level of control over inbox management.

## Input Parameters

| Parameter | Type | Description | Optional |
|---|---|---|---|
| `mail` | String | The YOPmail email address (without the @yopmail.com domain). | No |
| `id` | String | The unique ID of the email to delete. | No |

## Purpose

The primary purpose of `deleteMessage()` is to provide a method for deleting specific emails from a YOPmail inbox based on their unique identifier. This is particularly useful for:
Expand Down
10 changes: 10 additions & 0 deletions Writerside/topics/getInbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@

The `getInbox()` function in the Easy-YOPMail library provides a streamlined way to access and retrieve the contents of a YOPmail inbox. This function is essential for managing temporary email addresses and interacting with received messages programmatically.


## Input Parameters

| Parameter | Type | Description | Optional |
|---|---|---|---|
| `mail` | String | The YOPmail email address (without the @yopmail.com domain). | No |
| `search` | Object | An object containing search criteria to filter emails (e.g., { from: '[email protected]' }). | Yes |
| `settings` | Object | An object containing settings for inbox retrieval (e.g., { LIMIT: 10 }). | Yes |


## Purpose

The `getInbox()` function serves the following purposes:
Expand Down
3 changes: 3 additions & 0 deletions Writerside/topics/getMail.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

The `getMail()` function is a powerful tool offered by the Easy-YOPMail library that allows developers to dynamically generate random email addresses. This feature is especially useful in scenarios where a unique and temporary email address is required without the need for manual interaction with a web interface or complex configurations.

## Input Parameters
This method does not require any input parameters.

## Purpose

The primary purpose of `getMail()` is to simplify the process of acquiring a temporary email address for various use cases, including:
Expand Down
51 changes: 8 additions & 43 deletions Writerside/topics/starter-topic.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[//]: # (<show-structure for="chapter,procedure" depth="2"/>)

# 📧 EasyYopmail v5
# 📧 EasyYopmail v5.x.x

![Easy-YOPmail_title.png](Easy-YOPmail_title.png)
<!--Writerside adds this topic when you create a new documentation project.
Expand Down Expand Up @@ -312,49 +312,13 @@ Here's an example of how to use the `writeMessage()` function:

## 🗑️ How to delete a temporary email? {id="title_8"}
![8.png](8.png)
With Easy-Yopmail you have two options for deleting emails: you can delete a specific email using its ID with the deleteMessage() function or you can delete all emails in an inbox using the deleteInbox() function.
Deleting a Specific Email
Identify the Email ID: Use the getInbox() function to retrieve a list of emails in the inbox, including their IDs.
Use the deleteMessage() Function: Call the function with the email address and the ID of the email you want to delete.
Handle the Response: The function will return a message indicating whether the email was successfully deleted or not.
With Easy-Yopmail you have two options for deleting emails:

```mermaid
sequenceDiagram
participant NodeJS
participant EasyYopmail
participant Yopmail
NodeJS->>EasyYopmail: getInbox(mailAddress)
activate EasyYopmail
EasyYopmail->>Yopmail: Request inbox details
Yopmail->>EasyYopmail: Return inbox details (including IDs)
deactivate EasyYopmail
NodeJS->>EasyYopmail: deleteMessage(mailAddress, emailId)
activate EasyYopmail
EasyYopmail->>Yopmail: Request to delete email with specific ID
Yopmail->>EasyYopmail: Confirm deletion (success or failure)
deactivate EasyYopmail
NodeJS->>NodeJS: Process deletion confirmation
```

<procedure title="Deleting a Specific Email code" id="5" type="steps">
<step>
<code-block lang="javascript" collapsible="true" default-state="collapsed">
const easyYopmail = require('easy-yopmail');
easyYopmail.getInbox('[email protected]')
.then(inbox => {
const emailIdToDelete = inbox.inbox[0].id; // Get the ID of the first email
easyYopmail.deleteMessage('[email protected]', emailIdToDelete)
.then(response => {
console.log(response); // Output: "The mail with ID [emailIdToDelete] has been successfully deleted."
});
});
</code-block>
</step>
</procedure>
1. **Deleting a Specific Email:** This allows you to remove a single email using its unique ID.
2. **Deleting the Entire Inbox:** This option permanently erases all emails within the inbox.


Deleting All Emails in an Inbox
Use the deleteInbox() Function: Call the function with the email address of the inbox you want to empty.
### Deleting the Entire Inbox
Use the **deleteInbox()** Function: Call the function with the email address of the inbox you want to empty.
Handle the Response: The function will return a message indicating whether the inbox was successfully emptied or not. It will also tell you how many emails were deleted.

```mermaid
Expand All @@ -370,7 +334,6 @@ sequenceDiagram
NodeJS->>NodeJS: Process deletion confirmation and number of emails deleted
```


<procedure title="Deleting All Emails in an Inbox code" id="6" type="steps">
<step>
<code-block lang="javascript" collapsible="true" default-state="collapsed">
Expand All @@ -383,6 +346,8 @@ sequenceDiagram
</step>
</procedure>

> To learn how to delete specific emails, check out the detailed documentation for the **deleteMessage()** function
> in the dedicated section. {style="note"}

<seealso>
Expand Down
9 changes: 9 additions & 0 deletions Writerside/topics/writeMessage.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

The `writeMessage()` function in the Easy-YOPMail library allows you to send emails from a YOPmail address. This function is particularly useful for automating tasks that involve sending emails, such as notifications, confirmations, or testing email workflows.

## Input Parameters

| Parameter | Type | Description | Optional |
|---|---|---|---|
| `mail` | String | The YOPmail email address (without the @yopmail.com domain) to send from. | No |
| `to` | String | The recipient's email address. | No |
| `subject` | String | The subject of the email. | No |
| `body` | String | The body of the email. | No |

## Purpose

The primary purpose of `writeMessage()` is to provide a programmatic way to send emails using a YOPmail address. This can be beneficial for various scenarios, including:
Expand Down
2 changes: 1 addition & 1 deletion Writerside/writerside.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
<ihp version="2.0">
<topics dir="topics" web-path="topics"/>
<images dir="images" web-path="images"/>
<instance src="e.tree" web-path="easy-yopmail" version="4.3.6"/>
<instance src="e.tree" web-path="easy-yopmail" version="5.0.0"/>
</ihp>
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "easy-yopmail",
"version": "4.3.6",
"version": "5.0.0",
"description": "Easy-YOPMail (get mail address, inbox and read mail from YOPMail with nodeJS)",
"main": "index.js",
"engines": {
Expand Down
Loading

0 comments on commit 7e59db8

Please sign in to comment.