PhdParticipant participant = getPhdParticipant();
if (participant.isInternal()) {
InternalPhdParticipant internalParticipant = (InternalPhdParticipant) participant;
new PhdAlertMessage(getProcess(), internalParticipant.getPerson(), getFormattedSubject(), buildBody(getProcess(),
participant));
new Message(getSender(), new Recipient(Collections.singleton(internalParticipant.getPerson())), buildMailSubject(),
buildMailBody());
} else {
new Message(getSender(), Collections.<ReplyTo> emptyList(), Collections.<Recipient> emptyList(), buildMailSubject(),
buildMailBody(), Collections.singleton(participant.getEmail()));
}
}