public EmailDeliveryResponse CreateResponse(ResponseStates status, string ExtraCorrelation = "")
        {
            EmailDeliveryResponse mess = new EmailDeliveryResponse();

            mess.MessageHeader.NmsCorrelationId = this.MessageHeader.NmsCorrelationId + ExtraCorrelation;
            mess.Request = this;
            mess.Status  = status;
            return(mess);
        }
        private void OnMessageReceived(Messages.EmailDeliveryRequest message)
        {
            _currentRequest = message;



            Console.WriteLine(String.Format("Model intitiator request received: {0}", message.ToString()));

            Messages.EmailDeliveryResponse response = new Messages.EmailDeliveryResponse();


            // Let the user know we're starting
            ReplyToTemplate.ConvertAndSend(message.CreateResponse(ResponseStates.Success, ".STARTING"));


            // SendEmail
            response = RunSendEmail(message);


            Console.WriteLine("Complete");

            // Send the actual response
            ReplyToTemplate.ConvertAndSend(response);
        }
 protected override void OnMessageReceived(object sender, SimpleMessageResponse <Messages.EmailDeliveryRequest> message)
 {
     base.OnMessageReceived(sender, message);
     _response = (Messages.EmailDeliveryResponse)message;
 }