Easy-YOPMail v4
  • 💌Easy-YOPMail v4
  • 1️⃣getMail()
  • 2️⃣getInbox()
  • 3️⃣deleteInbox()
  • 4️⃣readMessage()
  • 5️⃣writeMessage()
  • 6️⃣deleteMessage()
Con tecnología de GitBook
En esta página
  • Description:
  • Practical Use:
  • Example Code:
  • Parameters:
  • Error Handling:
  • Limitations:

¿Te fue útil?

deleteInbox()

This feature allows you to empty your inbox by removing all messages.

Description:

The deleteInbox() function of Easy-YOPMail v4 enables developers to delete all emails from a specific YOPmail email address. This feature is essential when you need to clear an inbox after conducting tests or when you want to ensure no trace of sensitive emails remains.

Practical Use:

Deleting all emails from an inbox is useful in situations such as:

Software Testing: After conducting automated tests that generate multiple emails, you can use deleteInbox() to clear the inbox and prepare it for the next set of tests.

Privacy: If you've used a temporary email address to receive sensitive or confidential emails, you can use this function to ensure those emails are permanently deleted.

Example Code:

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

let email = 'sample_email_address';

easyYOPmail.deleteInbox(email).then(response => {
    console.log(response); // Sample output: true
});

Parameters:

The deleteInbox() function requires one parameter:

  • email: The email address from which you want to delete all emails.

Error Handling:

If the email address does not exist or there's any other issue while trying to delete the emails, the function will return an error. It's crucial to handle these errors appropriately in your code to prevent execution interruptions.

Limitations:

Once emails are deleted using deleteInbox(), they are permanently removed from the YOPmail application and cannot be retrieved.


AnteriorgetInbox()SiguientereadMessage()

Última actualización hace 1 año

¿Te fue útil?

Do you find this format and content suitable for documentation? If there is anything you would like to improve or add, please let me know.

https://github.com/jasp402/Easy-YOPmail/issues/new/choose
3️⃣
Page cover image