Oh yaa, this is something I am looking at.. 

Thanks Arun...

 Bye
  Shridhar
On Wed, 24 May 2000, Arun Sharma wrote:

> On Wed, May 24, 2000 at 04:36:39PM +0530, Shridhar Daithankar wrote:
> > Just got RFC 821 and one more thing on TBD list... :-)..
> 
> Is this good enough ? smtplib.py in python does it. It's object 
> oriented and can be used from Java, if you like.
> 
>       -Arun
> 
> # Test the sendmail method, which tests most of the others.
> # Note: This always sends to localhost.
>     import sys, rfc822
> 
>     def prompt(prompt):
>         sys.stdout.write(prompt + ": ")
>         return string.strip(sys.stdin.readline())
> 
>     fromaddr = prompt("From")
>     toaddrs  = string.splitfields(prompt("To"), ',')
>     print "Enter message, end with ^D:"
>     msg = ''
>     while 1:
>         line = sys.stdin.readline()
>         if not line:
>             break
>         msg = msg + line
>     print "Message length is " + `len(msg)`
> 
>     server = SMTP('localhost')
>     server.set_debuglevel(1)
>     server.sendmail(fromaddr, toaddrs, msg)
>     server.quit()
> 
> -----------------------------------------------------------------------
> For more information on the LIH mailing list see:
> http://lists.linux-india.org/lists/LIH
> 


-----------------------------------------------------------------------
LIH is all for free speech.  But it was created for a purpose - to help
people discuss issues about installing and running Linux.  If your
messages are counterproductive to this purpose, your privileges to
submit messages can and will be revoked.

Reply via email to