def get_reply_to_address(message):
 if message.first_message:
  first_message = Message._byID(message.first_message, data=True)
 else:
  first_message = message
 email_id = first_message._id36
 email_mac = hmac.new(g.secrets['modmail_email_secret'], email_id, hashlib.sha256).hexdigest()
 reply_id = 'zendeskreply+{email_id}-{email_mac}'.format(email_id=email_id, email_mac=email_mac)
 sr = Subreddit._byID(message.sr_id, data=True)
 return 'r/{subreddit} mail <{reply_id}@{domain}>'.format(subreddit=sr.name, reply_id=reply_id, domain=g.modmail_email_domain)

def get_reply_to_address ( message ) : if message . first_message : first_message = Message . _byID ( message . first_message , data = True ) else : first_message = message email_id = first_message . _id36 email_mac = hmac . new ( g . secrets [ 'modmail_email_secret' ] , email_id , hashlib . sha256 ) . hexdigest ( ) reply_id = 'zendeskreply+{email_id}-{email_mac}' . format ( email_id = email_id , email_mac = email_mac ) sr = Subreddit . _byID ( message . sr_id , data = True ) return 'r/{subreddit} mail <{reply_id}@{domain}>' . format ( subreddit = sr . name , reply_id = reply_id , domain = g . modmail_email_domain )
construct a reply-to address that encodes the message id .