Beispiel #1
0
        public Message ReplyToConversation(Conversation conversation, User sender, User receiver, string messageText, string subject, string body)
        {
            Message retVal = null;

            if (sender != null)
            {
                //TODO - don't just check or null - throw ex or don't check at all
                if (conversation != null)
                {
                    retVal = sender.WriteMessage(messageText);

                    conversation.AddMessage(retVal);

                    _emailService.SendMail(receiver.Email, subject, body);
                }
            }
            return retVal;
        }