Fix getting inbox message 'with' value; add a function to help extract strings