email.net-coreoutlookmailmessage

Sending an email with @-mention


Is it possible to send an email with @-metion from ASP.Net Core 5.0. If so, does anyone have any idea how to do it?

I've managed to successfully send an email using System.Net.Mail.MailMessage, but I can't figure out how to mention someone. The intention is that the recipient gets a notification in Outlook inbox that they are mentioned in this email.

I'm assuming that mentions only work within in Outlook within the recipients of the same organisation (please correct me if I'm wrong), which is still okay for my use case, as I have an account within our organisation, from which I can send this email, I just don't know how to set up these mentions in code when composing an email.

Example of a received email, where you are mentioned


Solution

  • After some directions from @mason and @phuzi, I've found out that these 3 conditions need to be met for this to work:

    1. The person needs to be one of the recipients
    2. There needs to be a mailto link in the body (<a href="mailo:my@email.com">Me</a>)
    3. There needs to be a header with the name "X-Mentions" and the email address as the value (comma separated for multiple mentions)

    (1 and 2 are probably just a good practice, rather than a technical requirement)