Search code examples
razorwebmatrixwebmail

webmatrix - Reply-To webmail.send header


Anyone know how to do the following in C#?

additionalHeaders.Add("Reply-To: [email protected]");

I need to insert it into the following code:

WebMail.Send(to: customerEmail,
        subject: "Booking enquiry from - " + customerEmail,
        body: customerRequest
    );

Solution

  • Solved it using:

    var header = new[]{"Reply-To:[email protected]"};
    WebMail.Send(to: customerEmail,
            subject: "Booking enquiry from - " + customerEmail,
            body: customerRequest,
            additionalHeaders: header
        );