Closed StephenMP closed 2 months ago
Good observation, I'll be checking it out. 👍🏻
It would be good to note also that it doesn't always fail to retrieve messages. Sometimes when the casing isn't all lowercase, it will still get the message, but not all the time; however, when I lowercase the email address I always get the message.
I have carefully reviewed this case. The page asks you to use a custom email. You can write it, CamelCase or directly all in CAPS. However, when we go to the inbox, it is shown all in lowercase.
The EasyYOPmail API does the same. All the text it receives is converted to lowercase.
const easyYopmail = require('easy-yopmail');
const AUTOMATION_EMAIL = 'SomeEmailAddress1234';
easyYopmail.getInbox(AUTOMATION_EMAIL).then(emails => {
console.log(emails);
});
It seems to me that the error you have experienced may be due to another cause.
When attempting to get an email via
I am presented with the error
However, the email and message does exist. When I call:
I receive the expected messages:
When troubleshooting, I noticed that when I looked up the messages on YOPMail, they show the email address with all lowercase letters. So changing my initial request to
I get the email message successfully.
Thus, it's likely that when attempting to get messages, the email address should be converted to lowercase prior to querying YOPMail.