Re: How to send E-mail without an external SMTP server ?



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
.



Relevant Pages

  • Re: Deleting all jobs in remote print queue
    ... remote machine is Server 2003 or XP. ... We have situations in which we need to delete all print jobs, ... print queues, via a script. ...
    (microsoft.public.windowsxp.print_fax)
  • Re: Copying jobs to a new server.
    ... You can generate the script for all jobs (Enterprise manager -- Right click ... node in SQl Agent -- Jobs| All tasks| Generate sql script, ... script in the destination server. ...
    (microsoft.public.sqlserver.server)
  • Re: Running a script when Database Mirroring fails over
    ... I'm trying to determine the most efficient method for running a script after my Principal fails over to my Mirror within Database Mirroring. ... those are configured on the Principal server. ... If my jobs are configured to send a notification and run a script when the Principal fails over, how will those jobs execute if the Principal server completely crashes? ...
    (microsoft.public.sqlserver.server)
  • Re: script all MSDB jobs in TSQL
    ... Server is Source Server where you want to script jobs from ... owner is the new owner of the jobs. ...
    (microsoft.public.sqlserver.server)
  • Re: Wut does SQL do in this case?
    ... I don't usually script ... out the jobs as I don't usually change the standard replication jobs (these ... Paul Ibison SQL Server MVP, ... Dim objReplication ...
    (microsoft.public.sqlserver.replication)