示例#1
0
        /// <summary>
        /// Creates and adds new 'Auto Response' action to UserMessageRuleActionCollection collection.
        /// </summary>
        /// <param name="description">Action description text.</param>
        /// <param name="from">MAIL FROM: what is reported to destination SMTP server when auto response is sent.</param>
        /// <param name="message">Full auto response message. This must be rfc 2822 defined message.
        /// You can use LumiSoft.Net.Mime class to parse and to construct valid message.</param>
        /// <returns></returns>
        public UserMessageRuleAction_AutoResponse Add_AutoResponse(string description, string from, byte[] message)
        {
            UserMessageRuleAction_AutoResponse action = new UserMessageRuleAction_AutoResponse(
                m_pRule,
                this,
                Guid.NewGuid().ToString(),
                description,
                from,
                message
                );

            // Add action to rule
            Add(action);

            m_pActions.Add(action);

            return(action);
        }
        /// <summary>
        /// Creates and adds new 'Auto Response' action to UserMessageRuleActionCollection collection.
        /// </summary>
        /// <param name="description">Action description text.</param>
        /// <param name="from">MAIL FROM: what is reported to destination SMTP server when auto response is sent.</param>
        /// <param name="message">Full auto response message. This must be rfc 2822 defined message.
        /// You can use LumiSoft.Net.Mime class to parse and to construct valid message.</param>
        /// <returns></returns>
        public UserMessageRuleAction_AutoResponse Add_AutoResponse(string description,string from,byte[] message)
        {
            UserMessageRuleAction_AutoResponse action = new UserMessageRuleAction_AutoResponse(
                m_pRule,
                this,
                Guid.NewGuid().ToString(),
                description,
                from,
                message
            );

            // Add action to rule
            Add(action);

            m_pActions.Add(action);

            return action;
        }