With self-hosting, you can do it but it takes time to get good reputation.
I have set https://github.com/postalserver/postal and there are many details you usually don't worry about, the cost involved is whatever server you pay for, still, this is more adequate when you want to send emails through an API, for normal usage patterns, AWS is cheaper and simpler to set up.
I have set https://github.com/postalserver/postal and there are many details you usually don't worry about, the cost involved is whatever server you pay for, still, this is more adequate when you want to send emails through an API, for normal usage patterns, AWS is cheaper and simpler to set up.