Leo Kislov wrote: >> >> Do I have to setup a smtp server on my localhost ? >> > > You need to use login method > <http://docs.python.org/lib/SMTP-objects.html>. And by the way, the > subject of your message is very confusing, you are posting log where > you're sending email using external server. > > Thanks.
Yes, I want to find a way to send email without an external smtp server. According to Rob's reply, I thought this could be implemented as described in the example code of "SMTP Example" on "http://docs.python.org/lib/SMTP-example.html". So I tried the code, but failed. Actually I was writing a script that can submit jobs automatically on a remote server. I should not submit the jobs all at once, because this will take up all resources of the server. I just want a specified number of jobs to be running at one time. If one jobs is over, the script should submit another job. I run the script with nohup, then I logout. The script will take care of all jobs. But I have to check the status of the script manually, which is very inefficient. So I want to be informed automatically by E-mail when all jobs are done. It's not safe if I have to use login method explicitly by which I have to put my username and password in the script. I have also tried the Unix command 'mail', but without success, either. I could use 'mail' to send an E-mail to the user on the server, but I couldn't send an E-mail to an external E-mail server. I realized that it may because the port 25 outgoing connections are blocked, so I gave up. I will have to login periodically to check the status of the jobs:-( Anyway, thank you, Rob, and thank you, Leo. xiaojf -- http://mail.python.org/mailman/listinfo/python-list