API sending directly from server instead of using SMTP

I am sending an email from an SMTP client. However this end up in Microsoft’s quarantine and doesn’t even reach the Junk folder of the recipient. The same email I send it to my self as an Axigen recipient. Then if I login to the web mail and forward it to my Microsoft account then I receive the email in the junk folder.
Can I somehow simulate sending of an email from the web mail when sending from an SMTP client?
Is there an API of some sort which I can use to send directly from the server and not using SMTP?