Script to create contact group from all the addresses in an email

Does anyone know of a script (I don’t see one in the scripts that c-command offers) to take all the addresses (all the To:'s) in a received email and create an address group of all of them in Contacts?