Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5932103
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T14:47:19+00:00 2026-05-22T14:47:19+00:00

When an item is rejected by a reviewer in the workflow process, how do

  • 0

When an item is rejected by a reviewer in the workflow process, how do I inform the submitter? This seems like a very common situation, but I just see the most basic fields in the “Email Action” item:

To, From, Subject, Message

Is there a system variable for the user and then something for the user’s email address? I’d expect it to be something like: $user.email.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T14:47:19+00:00Added an answer on May 22, 2026 at 2:47 pm

    Get the Mail Workflow Action from the shared source workflow actions.

    Then you need to extend Populate context a little bit to make access to the last users easier. Here is my implementation on one of our recent projects:

        protected virtual void PopulateContext(WorkflowPipelineArgs args)
        {
            VelocityContext.Put("args", args);
            var item = args.DataItem;
            VelocityContext.Put("item", item);
            VelocityContext.Put("language", item.Language.CultureInfo.EnglishName);
            VelocityContext.Put("version", item.Version.Number);
            VelocityContext.Put("comment", args.Comments);
            VelocityContext.Put("processor", args.ProcessorItem);
            VelocityContext.Put("user", Context.User);
            Database masterDatabase = Factory.GetDatabase(DatabaseNames.Master);
            var workflow = masterDatabase.WorkflowProvider.GetWorkflow(item);
            var history = workflow.GetHistory(item);
            VelocityContext.Put("history", history);
            if (history.Length > 0)
            {
                string lastUser = history[history.Length - 1].User;
                MembershipUser membership = Membership.GetUser(lastUser);
                VelocityContext.Put("authorEmail",
                                    membership != null
                                        ? membership.Email
                                        : DataAccessSettings.Workflow.WebQueryEmail);
            }
            VelocityContext.Put("state", workflow.GetState(item));
    
            var nextStateItem = GetNextState(args);
            VelocityContext.Put("nextState", nextStateItem != null ? nextStateItem.Name : string.Empty);
            VelocityContext.Put("time", DateTime.Now);
            VelocityContext.Put("previewUrl", string.Format("http://{0}/?sc_itemid=%7b{1}%7d&sc_mode=preview&sc_lang=en", DataAccessSettings.Site.HostName, item.ID.Guid));
            VelocityContext.Put("contentEditorUrl", string.Format("http://{0}/sitecore/shell/Applications/Content%20editor.aspx?fo=%7b{1}%7d&id=%7b{1}%7d&la=en&v=1&sc_bw=1", DataAccessSettings.Site.HostName, item.ID.Guid));
        }
    
        /// <summary>
        /// Processes the template, expanding all known values
        /// </summary>
        /// <param name="value">Template to process</param>
        /// <returns>Rendered template</returns>
        protected virtual string ProcessValue(string value, Item item)
        {
            var result = new StringWriter();
            try
            {
                Velocity.Evaluate(VelocityContext, result, "Extended mail action", value);
            }
            catch (ParseErrorException ex)
            {
                Log.Error(string.Format("Error parsing template for the {0} item \n {1}",
                                        item.Paths.Path, ex), this);
            }
            return result.GetStringBuilder().ToString();
        }
    
        #region helpers
    
        private static Item GetNextState(WorkflowPipelineArgs args)
        {
            Item command = args.ProcessorItem.InnerItem.Parent;
            string nextStateID = command["Next State"];
            if (nextStateID.Length == 0)
            {
                return null;
            }
    
            return args.DataItem.Database.Items[ID.Parse(nextStateID)];
        }
    
        private string ProcessFieldValue(string fieldName, Item item)
        {
            string value = item[fieldName];
            if (value.Length > 0)
            {
                return ProcessValue(value, item);
            }
            return value;
        }
    
        #endregion
    

    You can use $authoremail when setting up the email template.

    Hope that helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My item template in gridview is marked up like this. Where do I add
Each item looks like this: public interface IEffect { string Name { get; }
I select item from spinner but this item can't select and show. Help me
Each item in a WPF ListBox control seems to have a bit of left
My iOS Application has been in review, but was rejected regarding the iOS Data
Can anybody explain this error message: The composition remains unchanged. The changes were rejected
The item referenced in this question does not seem to work for me. I'm
Each item in c_data is in a category/section. I would like to limit how
If item_counter=213 then I want to set item_id to item213. Seems easy but: <%
Suppose Item A contains the link Item B would like to use as the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.