Getting spoof error while having different email address in Company departments

Hi,

I have configured SMTP using my “noreply” email address, and everything works fine when the “From” address in the mail function matches this configured email.

However, I have different email addresses assigned to various company departments. When sending emails related to, for example, orders from a department-specific email, because this time “From” have my order@domain.com email while SMTP using noreply@domain.com setting which is why I encounter a spoofing error.

Has anyone experienced a similar issue or found a solution? Any insights would be appreciated.

Thanks!