manhta
Not correct. I just changed the From email and Reply To email fields to another emailid in Global config and tested the email. It was received.
Further, expecting any random domain in the From emailid field to work is ridiculous. Only the domain that is hosted there will be allowed. Should a mail server be expected to send emails with From value elonmusk@twitter.com ??
Also, it has nothing to do with the Contact module because the contact module is supposed to send email ONLY to me i.e. the email listed in the config (and not to any random emailid that the user enters). You have already seen that it works. Even if only one value works as you claim (which is not correct actually), it should be fine. I don't care if it is not able to send emails to others. It is not supposed to.
Question is why is your module not able to send the email but the similar module by another developer is able to?
(Please remove the emailid from your post).