Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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/

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.



nowadays you have the option of using postfix+dovecot, which for me at least seems to be a lot easier.


Sending 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.


> 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.


> I wouldn't call it massive overkill.

You're running a web server to emulate telnet. It's a massive overkill.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: