webmatrix - 回复webmail.send标题

时间:2013-04-17 19:48:58

标签: razor webmatrix webmail

任何人都知道如何在C#中执行以下操作?

additionalHeaders.Add("Reply-To: test@test.com");

我需要将其插入以下代码中:

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

1 个答案:

答案 0 :(得分:0)

使用:

解决它
var header = new[]{"Reply-To:test@hotmail.com"};
WebMail.Send(to: customerEmail,
        subject: "Booking enquiry from - " + customerEmail,
        body: customerRequest,
        additionalHeaders: header
    );