Think this is uncharted territory and laws are probably irreconcilably disparate from state to state, from country to country.
In the U.S., it's likely that the most consistently established legal framework revolves around recorded telephone conversations, the one-party consent laws and two-party consent laws, of which some contain mentions and subsets of 'electronic communications.'