Mailkit: ReplyTo is Difficult for me to set

Created on 17 Sep 2018  路  2Comments  路  Source: jstedfast/MailKit

Is your feature request related to a problem? Please describe.
I'm just wanting to be able to set the reply to property in the MimeMessage so that emails that go out will reply to that property. I can't figure out what I would inherit or use to set this as I've been trying a few things and checking documentation for any answers on how to actually set the property.

Describe the solution you'd like
I can set the to addresses, from addresses, message and body, subject... I'd love to be able to set the reply to property as well or at least know how.

Describe alternatives you've considered
Trying to implement and change the code myself. I'm somewhat new at this so I need documentation that tells me how I would set properties like this with only a getter or at least how they were intended to be used and why I can't set them like other properties that I can set.

Additional context
If there's anything that helps me set this then please refer me and I would really appreciate it.

question

Most helpful comment

MimeMessage.ReplyTo does not have a setter - the way you add ReplyTo addresses is to add them to the existing MimeMessage.ReplyTo list. It works exactly the same way as the From, To, Cc, and Bcc properties.

Example:

var message = new MimeMessage ();
message.ReplyTo.Add (new MailboxAddress ("My Name", "[email protected]"));

All 2 comments

MimeMessage.ReplyTo does not have a setter - the way you add ReplyTo addresses is to add them to the existing MimeMessage.ReplyTo list. It works exactly the same way as the From, To, Cc, and Bcc properties.

Example:

var message = new MimeMessage ();
message.ReplyTo.Add (new MailboxAddress ("My Name", "[email protected]"));

Oh. So yea that makes a lot of sense and is definitely a super dumb question. I don't know why I didn't realize that.

Thank you.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

SpiritBob picture SpiritBob  路  4Comments

wayneguow picture wayneguow  路  5Comments

atiqi36 picture atiqi36  路  7Comments

portal7 picture portal7  路  3Comments

truane picture truane  路  4Comments