bool IMessageDestination.Send(string title, MessageExtendedInformation extended, IEnumerable<System.Net.Mail.Attachment> attachments, params MessageBodyReader[] messageBodies) { foreach (ConnectionInformation con in _connections) { string path = con.ConnectionString; string filename = string.Format(@"{0}\out\Send_{1}.txt", path, title); using (StreamWriter writer = new StreamWriter(filename)) { foreach (MessageBodyReader reader in messageBodies) { reader.Reset(); writer.Write(reader.ReadToEnd()); } writer.Close(); } } return true; }
bool IMessageDestination.ReplyTo(IMessage message, MessageBodyReader reply, MessageExtendedInformation extended) { foreach (ConnectionInformation con in _connections) { string path = con.ConnectionString; string filename = string.Format(@"{0}\out\ReplyTo_{1}.txt", path, message.Title); using (StreamWriter writer = new StreamWriter(filename)) { reply.Reset(); writer.Write(reply.ReadToEnd()); writer.Close(); } } reply.Reset(); return true; }