private void HandleEWSMessage(EWSIncomingMessage originalMessage, IWorkItemFields workItemFields) { var replyTemplate = new AckEmailTemplate(_config.EmailSettings.GetReplyTemplate()); var replyBody = replyTemplate.Apply(workItemFields, _config); originalMessage.Reply(replyBody, _config.EmailSettings.AckEmailsRecipientsAll); }
private void HandleEWSMessage(EWSIncomingMessage originalMessage, IWorkItemFields workItemFields) { var replyTemplate = new AckEmailTemplate(_config.EmailSettings.GetReplyTemplate()); var replyBody = replyTemplate.Apply(workItemFields, _config); originalMessage.BeforeMessageSend += (origmessage, message) => { // only add the work item id, if it not allready there // TODO: remove hard coded strings hier an place it in the configuration if (!origmessage.Subject.Contains("bug #")) { message.Subject = "bug #" + workItemFields.ID + " created RE: " + origmessage.Subject; } }; originalMessage.Reply(replyBody, _config.EmailSettings.AckEmailsRecipientsAll); }