We can use Wait-Notify processors to wait for 2 Target Signal Count then wait processor releases the flowfile once target signal count number reaches to 2.
Refer to this link for usage/configuring wait/notify processors.
Another way is by using MergeContent processor with correlation attribute name and Minimum number of entries as 2 then processor will wait for 2 flowfiles with the same attribute name then merges the flowfiles and then send mail based on that.
Refer to this and this links for same use case with mergecontent processor.
If the Answer helped to resolve your issue, Click on Accept button below to accept the answer, That would be great help to Community users to find solution quickly for these kind of issues.