The answer very much depends on the receiving MTA's configuration. However, it can (and should) be done.
Postfix has a
smtpd_sender_restrictions configuration option which controls what happens when it sees a
MAIL FROM message. One such configuration option is
reject_unknown_sender_domainwhich validates that the sender domain has an
MX record, i.e. the domain sends email. If the domain does not resolve, then by definition it has neither of these things and so postfix will refuse the email.
Other MTAs will have similar options.
When the receiving MTA decides to reject the email, it will tell your smtp relay server that is what happened and your mail relay will then tell you.