When and why did folding a letter in on itself and sealing it shut become replaced with using a separate envelope?

by fraughtwithperils
Ertata

More can always be said but this answer to a related question by u/gerardmenfin points to the late 17th century.