If I’m understanding this correctly, the reply_by_email_address should be set in the reply-to field of the envelope sent by the Discourse (from yyy.com). So when the user replies, they reply to the reply-to email (gmail.com) rather than the original (yyy.com) address. So in the email response envelope, the from address should be the users email address and the to is the gmail.com address.
Why would the reply_by_email_address be used as the from address?