Go toPasswords & Accounts(formerlyAccounts & Passwords).

Go to theAccountssection and choose an email account.

Tap the email address again where it saysAccount.

Three iOS screens showing Account, Advanced, and Deleted Mailbox buttons

Scroll to the bottom and selectAdvanced.

In theMove Discarded Messages Intosection, choose eitherDeleted MailboxorArchive Mailbox.

This determines whether you see a Delete button or an Archive button when you swipe in Mail.

Two iOS screens showing Account and Done buttons

Confirm thatDeleted Mailboxredirects toTrashif you want to swipe to delete emails.

When you set swiping toArchiveinstead of delete, set theArchive MailboxtoAll Mail.

With archiving set as the action that discards mail, you candelete from the archiving buttonbut not by swiping.

Swipe to move messages on an iPhone

Instead, selectMore>Move Message, then selectTrash.

TapTrash(orArchive) to process the email.