Find the reply key for a specific topic. Rails console magic?

Hi, folks. I’m trying to set up automated forwarding of certain emails to a topic and/or to create a new topic in a given category. I’m struggling to test and it would help me to be able to generate the “reply key” for an existing topic or category on demand. Is there some Rails console magic that I could perform to generate the reply key without sending myself email notifications? Am I stuck with end-to-end testing to figure this out? (Create dummy topics, wait for email notifications, and so on.)

Thank you.

If you want to create new topics in a given category, then you set that up in the Custom incoming email address: setting in the category settings. See Configure incoming email to create new topics or group messages, I think.

I don’t think there’s any way to do that for a topic, as each reply key is tied to a topic and a username.

Indeed, I have things working for creating new topics, which works well enough for my purposes, but I’d like to go farther.

Is there really no function I can invoke to get the reply key given a topic and a user? That seems a shame. I don’t think I have the energy to go caving to find it and extract it. I’d be shocked if it weren’t already extracted somewhere…

By chance, does anyone else know?

To be honest, I wasn’t very familiar with this part of the system, but it seems simple enough. This is where the reply key is created or retrieved for a given post and user, to be used when sending an email:

It’s emailed to them when it’s created. It’s good just for a single user and post. What are you going to do when you find it? I think it’s probably easier to just generate a new one if you want one, but then what are you going to do with it?

I have been trying for two days on and off to get email notifications of new topics in this category and I’m not receiving them. I am tired of trying to figure out which magic configuration options are wrong. I was hoping to do more directly the thing I’m actually trying to achieve: to be able to send an email to reply to a topic.

You need to change the category settings to watching (go to the category and click the c little :bell: on the right) and see that in your profile settings you have enroll me when set to always, otherwise, discourse won’t email you posts that you have seen already.

And finally it is behaving the way I expected. Evidently I needed to enable mailing list mode in my user profile in addition to enabling it as a site administrator.

I genuinely don’t know if I read that and failed to notice it or it’s not spelled out enough in the various bits of documentation.

I definitely needed someone to say “Do this” and for it to work. I appreciate you for doing exactly that.

Even so, it would be very convenient to be able to generate a reply key to an existing topic that I wasn’t Watching when it was created, so that I could start replying to it by sending email. This seems like a non-obvious-but-helpful scenario to me.

You do if you want every single message to be emailed to you. You can also watch particular categories and see that you have changed your settings so that Discourse emails you messages that you have already read in your web browser.

It would be useful only if you wanted to use the web interface to generate the key and then go to your mail client and start a message. How is that more convenient than just sending a reply? (Maybe you want everything you write to exist in your mail client?)