Swipe to Archive instead of Delete in Mail.app on El Capitan
Open Mail > Preferences > Viewing and change "Swipe Left To" from Trash to Archive (5th line down).

For macOS Sierra, its a little different.