mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-07-15 23:37:44 +08:00
parent
a200e35923
commit
7c725bf2ec
@ -57,6 +57,7 @@ namespace Orchard.Email.Activities {
|
|||||||
var replyTo = activityContext.GetState<string>("ReplyTo");
|
var replyTo = activityContext.GetState<string>("ReplyTo");
|
||||||
var bcc = activityContext.GetState<string>("Bcc");
|
var bcc = activityContext.GetState<string>("Bcc");
|
||||||
var cc = activityContext.GetState<string>("CC");
|
var cc = activityContext.GetState<string>("CC");
|
||||||
|
var notifyReadEmail = activityContext.GetState<bool>("NotifyReadEmail");
|
||||||
|
|
||||||
var parameters = new Dictionary<string, object> {
|
var parameters = new Dictionary<string, object> {
|
||||||
{"Subject", subject},
|
{"Subject", subject},
|
||||||
@ -64,7 +65,8 @@ namespace Orchard.Email.Activities {
|
|||||||
{"Recipients", recipients},
|
{"Recipients", recipients},
|
||||||
{"ReplyTo", replyTo},
|
{"ReplyTo", replyTo},
|
||||||
{"Bcc", bcc},
|
{"Bcc", bcc},
|
||||||
{"CC", cc}
|
{"CC", cc},
|
||||||
|
{"NotifyReadEmail",notifyReadEmail }
|
||||||
};
|
};
|
||||||
|
|
||||||
var queued = activityContext.GetState<bool>("Queued");
|
var queued = activityContext.GetState<bool>("Queued");
|
||||||
|
@ -63,7 +63,12 @@ namespace Orchard.Email.Forms {
|
|||||||
Id: "Body", Name: "Body",
|
Id: "Body", Name: "Body",
|
||||||
Title: T("Body"),
|
Title: T("Body"),
|
||||||
Description: T("The body of the email message."),
|
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) {
|
if (jobsQueueEnabled) {
|
||||||
|
@ -118,7 +118,13 @@ namespace Orchard.Email.Services {
|
|||||||
mailMessage.ReplyToList.Add(new MailAddress(recipient));
|
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);
|
_smtpClientField.Value.Send(mailMessage);
|
||||||
}
|
}
|
||||||
catch (Exception e) {
|
catch (Exception e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user