What is used for emailing at the backend?

I was sending emails by gmail and had no problem
now I wanted to use different email provider and cant get it going… Login denied(ec=67)
tested the settings and credentials in powershell if it works from simplest script, just cuz I was recently working with it, and it worked, so it does not seem like email provider problem
whats used at the backend to send emails? Cuz there are so many.

Curl is used to send mail (example e.g. here https://stackoverflow.com/questions/14722556/using-curl-to-send-email )

I was being retarded. Spam filter was the problem, nothing else.