Closed iam-alex-p closed 2 weeks ago
Hi, I've tried to replicate the error. The truth is that I don't see the cookie error, but I did see that the code you provided could be improved so that when the inbox is empty it stops the process and doesn't try to make an unnecessary loop. I did a test by leaving an email and your code worked correctly.
const easyYopmail = require('easy-yopmail');
const AUTOMATION_EMAIL = 'my.yop.email@yopmail.com';
easyYopmail.getInbox(AUTOMATION_EMAIL).then(emails => {
if (emails.inbox.length) {
console.log('You have messages in your inbox');
emails.inbox.forEach(msg => {
easyYopmail.readMessage(AUTOMATION_EMAIL, msg['id']).then(objMsg => {
console.log(objMsg);
});
});
} else {
console.log('You have no messages in your inbox');
}
});
Please validate what I'm telling you. And if you can, let me know so I can close this Issue.
Hello @jasp402,
Thank you for the quick response and for improving my code!
Unfortunately, I am still experiencing the same error getting Cookies. Can you please tell me what version of Node.js you are using to run the code?
It is possible that it is a re-Captcha problem. Can you go directly to the page and validate if it asks you for a captcha to see the email? If not, I can't think of anything else that could be affecting your query.
@jasp402, it does not ask me for a Captcha right away, when I am getting access to my email. However, it asks for Captcha from time to time, when I am navigating through inboxes. So, yeah... Cookies issue could be related to the Captcha...
In this case I don't see how they can be related. The cookie is not directly related to the re-captcha, it simply gets an empty message, but does not generate an error. I have tested the code you have provided me, I see it working correctly. Even using an online platform to test code online such as https://codesandbox.io/
@jasp402 thank you for looking into that! I forgot to mention that at the very beginning when I have just tried to read inboxes from that YOPMail account with your library, it worked for me. But than at some point, I started to experience that Cookie error without changing the code. So, really tricky issue...
Hello,
I am trying to read emails from YOPMail address using following code:
When I run this code, I am experiencing following error:
I am running easy-yopmail v5.1.0. Could it be a configuration issue? Any advice will be appreciated!
Sincerely, Aleksei