Email record is not saved in Emails if any invalid email is present

when any invalid email address is present in to the TO, CC, BCC along with valid email address, on click of send, there will be a error message shown in the UI--There was an internal server error.

But for valid email address actually  the email is getting sent and the sent email is not showing in emails tab

can anyone have anyone idea on why it is not saving the record for in emails for valid email address that is being sent