mail icon indicating copy to clipboard operation
mail copied to clipboard

Add an occ mail:account:update command

Open MaadixNet opened this issue 3 years ago • 4 comments

Additional occ command

The occ mail:account:update command can be used to update a single parameter or several at once using the desired input option.

Usage

Requires two arguments, to identify the account you want to edit:

  • user-id
  • name

Accepts all options included in mail:account:create eg: --imap-host --imap-port --imap-ssl-mode --imap-user --imap-password --smtp-host --smtp-port --smtp-ssl-mode --smtp-user --smtp-password

eg: occ mail:account:update [email protected] --smtp-ssl-mode=ssl --smtp-port=465

Why

It can happen that some email's setting ( smtp servername, port, password...) changes in the course of time. It would be useful to be able to apply these new settings while preserving the parameters that remain unaffected.

In large installations, if you were to change a connection parameter to the company mail server, it would be wasteful to do this manually or by deleting and recreating accounts.

MaadixNet avatar Jul 21 '22 02:07 MaadixNet

Thanks for opening your first pull request in this repository! :v:

welcome[bot] avatar Jul 21 '22 02:07 welcome[bot]

Thanks so much for updating your PR, it looks good! I'm not sure I will get to it this week but I will make sure to test your code as soon as possible. Great work!

miaulalala avatar Jul 26 '22 19:07 miaulalala

Thanks so much for updating your PR, it looks good! I'm not sure I will get to it this week but I will make sure to test your code as soon as possible. Great work!

Great. Thank you so much. No rush for us.

MaadixNet avatar Jul 29 '22 07:07 MaadixNet

@MaadixNet friendly ping on the requested changes above

ChristophWurst avatar Sep 08 '22 14:09 ChristophWurst

Hey, please don't merge this yet; since the design of this PR has changed a bit, it'd probably be a mistake to merge it without the ability to change the name and the email for a particular account.

Sending patch via email so submitter can update it.

evilham avatar Oct 14 '22 14:10 evilham

Hey, please don't merge this yet; since the design of this PR has changed a bit, it'd probably be a mistake to merge it without the ability to change the name and the email for a particular account.

Sending patch via email so submitter can update it.

Pushed changes to include name field in command

MaadixNet avatar Oct 17 '22 10:10 MaadixNet

Hey, this is still missing the email argument, should be there tomorrow IIUC.

evilham avatar Oct 17 '22 18:10 evilham

Hi, Now it should be ready. All arguments included.

MaadixNet avatar Oct 18 '22 08:10 MaadixNet

Psalm needs a baseline entry similar to https://github.com/nextcloud/mail/blob/8352d8acf08d1dbb5e203667999548b9f7795719/tests/psalm-baseline.xml#L46-L50 so it stops reporting the unknown Symfony command class

ChristophWurst avatar Oct 18 '22 10:10 ChristophWurst

Thanks everyone! :heart:

evilham avatar Oct 20 '22 11:10 evilham

Thank you very much !!

MaadixNet avatar Oct 21 '22 09:10 MaadixNet

Hello, I noticed that this MR is not included in the v1.15.0 line which is the latest for e.g. NC 24, is that expected? I noticed it is availble in v1.12.8 and in v2.X lines.

Cheers,

evilham avatar Jan 03 '23 11:01 evilham