Check out this plugin. Maybe it does what you need, maybe you can dive in the code to adapt it to your needs.
http://commonsinabox.org/documentation/plugins/buddypress-reply-by-email
https://github.com/r-a-y/bp-reply-by-email
Check out this plugin. Maybe it does what you need, maybe you can dive in the code to adapt it to your needs.
http://commonsinabox.org/documentation/plugins/buddypress-reply-by-email
https://github.com/r-a-y/bp-reply-by-email