Mailjs icon indicating copy to clipboard operation
Mailjs copied to clipboard

deleteMe() should reset private variables?

Open lasseklovstad opened this issue 4 months ago • 0 comments

Hi! After deleting account the token is reused in creating a new random account. Maybe the deleteMe method should reset the this.token?

const mailService = new Mailjs();
await mailService.createOneAccount();
await mailService.deleteMe();
// This call will throw Error: This account no longer exists.
await mailService.createOneAccount();

You could of course create a new Mailjs() instance for the new account, but that is just extra code.

lasseklovstad avatar Oct 18 '24 10:10 lasseklovstad