There are plenty of myths out there in the internet including that SMTP can work on different ports than port 25.
While this is true (as well as for every protocol), port 25 is the reserved one for SMTP and the only one official.
What does that mean ?
Well, you can send an email to an API or all kind of web applications out there, but in fact these services are mainly just "workers"*. These workers translate what you sent to them and they must have port 25 for the SMTP protocol or ports 465/587 for SMTPS (the secure version of SMTP) opened. And here's why.