2 ms·
Sendmail is everything but simple. The question was SMTP in general, which indeed is an extremely simple protocol. Here, this is how you send a plain text* mail
by pmlnr 9y ago
Sendmail is everything but simple. The question was SMTP in general, which indeed is an extremely simple protocol. Here, this is how you send a plain text* mail in python: https://petermolnar.net/not-mime-email-python-3/ https://petermolnar.net/not-mime-email-python-3/
Using an HTTP API for this is a massive overkill.
* I'm aware using utf-8 like this may confuse older clients but I didn't have problem with anything relatively modern I tested the receiving on.
- kowdermeister 9y agoSending is not the tricky part, implementing it right is probably another story. I wouldn't call it massive overkill. REST is extremely simple as well. You have to make an request anyways so it's just a question of preference how you connect to that the email sending service.
- pmlnr 9y ago> I wouldn't call it massive overkill. You're running a web server to emulate telnet. It's a massive overkill.
- bjpbakker 9y ago> implementing it right is probably another story Do you implement your own HTTP communication every time you need it or do you use a library? Just as for HTTP there are many good libraries for SMTP communication that you can easily use. No need to roll your own.
- beaconstudios 9y agonowadays you have the option of using postfix+dovecot, which for me at least seems to be a lot easier.