Nextcloud use SMTP for reading mails

standard Nextcloud use SMTP for reading mails
that means when a message is deleted from the mail server, it disappear from nextcloud

So my requirement is to find a solution so messages remain on nextcloud after are deleted from the mail server. The location of the nextcloud is different from the location of mail server so it cannot be installed the mail server on the nextcloud directly

Hi, I think you mean IMAP instead of SMTP which only transport mail. The Mail app (or rainloop) is only an IMAP client AFAIK.

You only can do it with the old POP protocol but I don’t think it’s possible to use it in nextcloud.

can you explain to me how to do

Unfortunatly, you can’t. Both Mail and Rainloop don’t support POP.
Just curious to understand why you want your mails only available from nextcloud.

The mails are never on the nextcloud server.

I’m using Nextcloud for storing files, collaboration, etc

What other solutions exist, similar to nextcloud and that also has pop 3 mail?

I don’t think you will find POP provider easily. I’m myself a mail (french) provider (Bee Home) with support of POP protocol, but nobody use it.

I think that makes less sense.

a.) the mail provider is your “mail cloud”
b.) normal mail clients (with pop3) are local and not cloud

Perhaps you can use webmail e.g. from your actual mail provider e.g. with Roundcube and then only use a link in Nextcloud. app external