RainLoop / rainloop-webmail

Simple, modern & fast web-based email client
http://rainloop.net
MIT License
4.07k stars 873 forks source link

plugin hmail-alias integration #2211

Open Oxymoron290 opened 1 year ago

Oxymoron290 commented 1 year ago

This Pull request is not quite a duplicate of #1863

While @karobolas did admirable work on that pull request, there were a few issues. The major one being direct database access to hmail. This isn't recommended as the hmail COM api is a better choice. This Pull request uses that com api to get the user's first name and last name to use as the user identity in rainloop.

Also, instead of using direct filesystem IO to read/write to the json file that stores the user identity, I am now using the existing mechanisms in place to do such work.

I have tested this in my environment and confirmed it is working.

Oxymoron290 commented 1 year ago

Test cases

Scenario: Logging in for the first time Result: default identity 'name' set to same values as hMailServer upon login. All over properties on the identity remain the same.

Scenario: Logging in for the second time Result: No change

Scenario: Logging in after changing the 'name; on the default identity Result: default identity 'name' set to same values as hMailServer upon login. All over properties on the identity remain the same.

Scenario: Logging in with an account which has multiple identities Result: Only the default identity 'name' set to same values as hMailServer upon login, additional identities remain untouched.