Shouldn't you use connection.transaction.rcpt_to as the recipients, not the headers you're looking at? And you probably need to loop through them and store one document for each.
Each item in the array is an Address object, which has .user and .host properties already.
That is a great idea! Didn't realize that was parsed so nicely