On Thu, 05 Jul 2007 18:56:49 -0000, _spitFIRE <[EMAIL PROTECTED]> wrote: >On Jul 5, 1:34 pm, "Jeff McNeil" <[EMAIL PROTECTED]> wrote: >> If you just want to send mail, you should be able to use the standard >> smtplib module (http://docs.python.org/lib/module-smtplib.html). If >> your recipients are on the Internet, you would need to handle MX >> resolution yourself. >> > >How complicated is to handle the MX resolution by myself? I'm sorry >that I don't have a clue regarding that. Any pointers would be greatly >appreciated.
You need to do a DNS MX lookup. There's nothing in the Python stdlib which provides this functionality. There are several libraries available which do this, though (Twisted among them ;). You can probably find them with a little googling. Beyond that, the rules for processing MX records are simple and it's not much work to pick the right host once you can do the MX lookups. Jean-Paul -- http://mail.python.org/mailman/listinfo/python-list