Spam filters work differently on different email providers. They can mark as spam if the FROM address doesn't use the same domain that the email was sent FROM, or if the proper SPF, and DKIM records aren't being created and set properly. Spam can also be triggered if your SMTP server's IP address has been added to an email black-list for sending SPAM, or because of the specific content of the email triggering a spam filter.
You can try using a service like: https://www.mail-tester.com/ to test your emails and they will tell you how likely a server would be to mark it as spam and why.