nodemailer / wildduck-webmail

Demo webmail service for WildDuck Mail Server
https://wildduck.email/
Other
147 stars 44 forks source link

Update email address or domain? #28

Closed openbugbot closed 1 year ago

openbugbot commented 4 years ago

Hi, I'm trying to update one email address to another.

apiClient.addresses.update(req.user, 'user@example.com', {address: 'user2@example2.com'}, (err) => {
console.log(err)
})

And I get the error

{ Error: child "id" fails because ["id" must only contain hexadecimal characters, "id" length must be 24 characters long]

What is the proper way to change the email address for a user? Or is it more appropriate to create a new user with a new address?

laurivosandi commented 1 year ago

First of all this question is not related to webmail

I am not sure about the semantics of the API client libraries, but when I look at Wildduck API then the id refers to user identifier and not the email. You first need to another API call to resolve e-mail address into the identifier

https://docs.wildduck.email/api/#operation/updateUserAddress https://docs.wildduck.email/api/#operation/resolveAddress