On Saturday 30 June 2012, Ram Rachum wrote:
>
> I basically want a function `send_mail` that takes an email address, a
> subject line, and a content, and sends.
>
email doesn't work this way. You need a sender, and most mail servers for
receivers will not talk to you if you don't have an MX record in DNS; which
means, in practice, you need some "recognized" mail server to send through.
So, your "send mail" function can only work after you've told it, in some way,
who's the sender, where's the mail server, and (usually) how to log in to it.
> I know that Django provides one, but using Django would entail having a
> "site" and a settings file, and I don't want any of those for this project.
>
The little email I did out of Django was using Lamson (
lamsonproject.org) --
but again, that is more on the receiving end, and it's a whole framework.
Perhaps you can get something more to your taste out of that.
HTH,
Shai.