Search code examples
c#smtpsmtpclient

Prevent a user from replying to a message


Is there any mechanism in which you can prevent a user from replying to an email message? Here's the use case:

  1. An automated system (C#.net) sends emails to a user. The action of the task is included in the email message (e.g. RSVP link for "yes" or "no")
  2. Instead of using the buttons/actions in the email, the user replies to the email.
  3. The email originally sent specifically says that the mailbox in use is unmonitored. (in bright red box!!!)
  4. The user doesn't actually read the email, and gets pissed off when nobody replies or his RSVP is "lost"

Clearly a user issue. I'm thinking the best recourse might be an automated reply saying the mailbox is unmonitored if a user replies to the e-mail.

Any SMTP conditions/flag which can prevent a user from replying in the first place?


Solution

  • I don't believe there is any setting that you can include in the original email that would stop someone from replying to an email. If the recipient really wants to reply, they can literally copy-paste the sender's email address into a new email and reply to it that way.

    Just wanted to point out that the following hack is not elegant and would result in a bad customer experience. This is the only way I could think of achieving this.

    One hack that comes to my mind is that you can try to set MailMessage.ReplyToList property to an invalid email address like - abc@[email protected]. In theory, this will force the customer's email client to reply to the invalid email address instead of the original sender. We can hope that the customer's email client validates that before sending the reply.

    I have not tried this myself as I don't have an SMTP server to validate. But if the SMTP server does not validate the ReplyToList value then it should work.

    Again this is a super sketchy hack and might not work with all the email clients out there.

    You are better off setting up an auto-reply on the mailbox.