Given the following CQRS + DDD background:
Aggregate Root:
class Message{Guid guid, string content, Guid toUserGuid, MessageStatus status...}
class User{Guid guid, string name, Email email...}
Command:
CreateMessageCommand{Guid messageGuid, string content, Guid toUserGuid...}
CommandHandler:
CreateMessageCommandHandler<CreateMessageCommand> => create a message aggregate root (status set to e.g. "Request Received") and save it through MessageRepository(The message has not been sent yet. CreateMessageCommandHandler only create and save the message aggregate root). Then publish a MessageCreatedEvent
Event:
MessageCreatedEvent{Guid messageGuid}
EventHandler:
MessageCreatedEventHandler<MessageCreatedEvent> => Get Message using event.messageGuid through MessageRepository => ??? => emailService.Send(user.email, message.content) => status set to "Sent"
My question is, in the MessageCreatedEventHandler<MessageCreatedEvent> "???" part, am I allowed to get User using message.toUserGuid through UserRepository, for sake of e.g. getting user.email. Another option would be a domain service UserService with method GetEmailById(Guid userGuid) => Email, I think it is better because event handler don't need the entire object of User, and UserService can handle all the logic of how to retrieve a User (e.g. with UserRepository)
I am not trying to get read model (Query-side) here, I just need some information from aggregate root which is not the current context.
Thank you, I appreciate any comments and answers related to this topic.
TLDR: In CQRS command handler/event handler, how should I get information about aggregate root which is outside my current command/event context.