mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-07-15 15:21:09 +08:00
parent
a200e35923
commit
7c725bf2ec
@ -57,6 +57,7 @@ namespace Orchard.Email.Activities {
|
||||
var replyTo = activityContext.GetState<string>("ReplyTo");
|
||||
var bcc = activityContext.GetState<string>("Bcc");
|
||||
var cc = activityContext.GetState<string>("CC");
|
||||
var notifyReadEmail = activityContext.GetState<bool>("NotifyReadEmail");
|
||||
|
||||
var parameters = new Dictionary<string, object> {
|
||||
{"Subject", subject},
|
||||
@ -64,7 +65,8 @@ namespace Orchard.Email.Activities {
|
||||
{"Recipients", recipients},
|
||||
{"ReplyTo", replyTo},
|
||||
{"Bcc", bcc},
|
||||
{"CC", cc}
|
||||
{"CC", cc},
|
||||
{"NotifyReadEmail",notifyReadEmail }
|
||||
};
|
||||
|
||||
var queued = activityContext.GetState<bool>("Queued");
|
||||
|
@ -63,7 +63,12 @@ namespace Orchard.Email.Forms {
|
||||
Id: "Body", Name: "Body",
|
||||
Title: T("Body"),
|
||||
Description: T("The body of the email message."),
|
||||
Classes: new[] {"tokenized"})
|
||||
Classes: new[] {"tokenized"}),
|
||||
_NotifyReadEmail: New.Checkbox(
|
||||
Id: "NotifyReadEmail", Name: "NotifyReadEmail",
|
||||
Title: T("Notify email read"),
|
||||
Checked: false, Value: "true",
|
||||
Description: T("Notify when email sent gets read by the recipient."))
|
||||
));
|
||||
|
||||
if (jobsQueueEnabled) {
|
||||
|
@ -118,7 +118,13 @@ namespace Orchard.Email.Services {
|
||||
mailMessage.ReplyToList.Add(new MailAddress(recipient));
|
||||
}
|
||||
}
|
||||
|
||||
if (parameters.ContainsKey("NotifyReadEmail")) {
|
||||
if (parameters["NotifyReadEmail"] is bool) {
|
||||
if ((bool)(parameters["NotifyReadEmail"])) {
|
||||
mailMessage.Headers.Add("Disposition-Notification-To", mailMessage.From.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
_smtpClientField.Value.Send(mailMessage);
|
||||
}
|
||||
catch (Exception e) {
|
||||
|
Loading…
Reference in New Issue
Block a user