The best solution (IMHO) doesn't actually work: you should be able to use the Tokens module and use a proper token to fill a recipient field. For example:
[node:author:mail]
However, Webforms only appears to support its own %something ` tokens, and those only relate to the current user and the webform id (not the id of the node being read).
So instead, write the site's inevitable custom module and use hook_mail_alter()
to change the To address.
Another resource I read (and have now lost) suggested setting the Webforms recipient to something easily recognizable, like "[email protected]".
Then in your hook_mail_alter()
function,
- confirm the form's identity,
- get the current post's author,
- get that user's email address, and
- use it in the Recipients. (Along with the admin & the poster, as you like.)