Пример #1
0
        public void Run(IActionContext actionContext)
        {
            var    configuration = actionContext.Configuration;
            string subject       = (string)configuration["subject"];
            string message       = (string)configuration["message"];
            string from          = (string)configuration["from"];
            string to            = (string)configuration["to"];

            // resolving the texts
            subject = _attributeExpressionResolver.ResolveAttributeExpression(subject, actionContext);
            message = _attributeExpressionResolver.ResolveAttributeExpression(message, actionContext);
            //IUser user = (IUser)_actorExpressionResolver.ResolveArgument(to, actionContext);
            //to = user.Email;
            if (string.IsNullOrEmpty(from))
            {
                from  = actionContext.GetProcessDefinition().Name;
                from  = from.ToLower();
                from  = from.Replace(' ', '.');
                from += "@netbpm.org";
            }

            SendMail(from, to, subject, message, actionContext);
        }
Пример #2
0
		public void Run(IActionContext actionContext)
		{
			IDictionary configuration = actionContext.GetConfiguration();
			String subject = (String) configuration["subject"];
			String message = (String) configuration["message"];
			String from = (String) configuration["from"];
			String to = (String) configuration["to"];

			// resolving the texts
			subject = _attributeExpressionResolver.ResolveAttributeExpression(subject, actionContext);
			message = _attributeExpressionResolver.ResolveAttributeExpression(message, actionContext);
			IUser user = (IUser) _actorExpressionResolver.ResolveArgument(to, actionContext);
			to = user.Email;
			if ((Object) from == null)
			{
				from = actionContext.GetProcessDefinition().Name;
				from = from.ToLower();
				from = from.Replace(' ', '.');
				from += "@netbpm.org";
			}

			SendMail(from, to, subject, message, actionContext);
		}
Пример #3
0
        public void Run(IActionContext actionContext)
        {
            IDictionary configuration = actionContext.GetConfiguration();
            String      subject       = (String)configuration["subject"];
            String      message       = (String)configuration["message"];
            String      from          = (String)configuration["from"];
            String      to            = (String)configuration["to"];

            // resolving the texts
            subject = _attributeExpressionResolver.ResolveAttributeExpression(subject, actionContext);
            message = _attributeExpressionResolver.ResolveAttributeExpression(message, actionContext);
            IUser user = (IUser)_actorExpressionResolver.ResolveArgument(to, actionContext);

            to = user.Email;
            if ((Object)from == null)
            {
                from  = actionContext.GetProcessDefinition().Name;
                from  = from.ToLower();
                from  = from.Replace(' ', '.');
                from += "@netbpm.org";
            }

            SendMail(from, to, subject, message, actionContext);
        }