R: [Tutor] E-mailing

Marcel Preda pm@dis.ro
Tue, 4 Jul 2000 17:10:17 +0200


----- Original Message ----- 
From: Denis Mironenko <denis_mir@hotmail.com>
To: <tutor@python.org>
Sent: Tuesday, July 04, 2000 4:59 PM
Subject: [Tutor] E-mailing


> I am trying to create a simple script that would allow users to send an 
> e-mail from an intranet page. I know of two ways of doing it, first is to 
> send an email some external program and second is to open my own connection. 
> Could you give me an example of how can I do it? Or is there some resources 
> on the net that explain the whole process?


import smtplib

server = smtplib.SMTP('aMailhost.com')
server.sendmail(mailFROM,toAddress,message)
server.quit()


PM

_______________________________
"Will I be using Python today?"
 and if the answer is "yes"
 I know that it's going to be a good day.