(h/t +John E. Bredehoft)
Reshared post from +Jeff Schultz
How an envelope inserter works!
Letters are stacked in hoppers (in this case 2 letters) at the back of the machine. Letters are stacked on top of each other along the track and then pushed into an envelope that is traveling along parallel to the letters. The envelope is sucked open with a vacuum to accept the letters. Then the flapped is moistened with a little brush and sealed shut. Everything is flipped over to keep it in order and so the people operating the machine can watch for different mailing trays, etc.

Thanks for making junk mail efficient.
While I typed that more trees died.
I was actually introduced to this as part of the payroll process — taking checks and folding/inserting them into envelopes. Of course, most of that is handled electronically now (as is, come to think of it, most junk mail).