Newbie question: SMTP -> SQL Server

hg hg at nospam.org
Thu Jan 11 03:49:50 EST 2007


jrpfinch wrote:

> I have an externally-written piece of software that spits out emails
> using SMTP (a few hundred per hour) and I would like to dump the
> content of them in an MS SQL Server database.
> 
> I have barely used Python before but it looks as if it could do the
> job.  I have no experience with mail agents.  My starting point is this
> recipe:
> 
> http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/440690
> 
> I know that there are various libraries that can connect to MS SQL
> server and I am going to research these.
http://sourceforge.net/projects/mysql-python
> 
> I have two questions:
> 
> i)  Does this sound like an efficient way of transferring data to the
> database?
Not certain I understand

> ii)  Looking through the Python documentation, I cannot see a way to
> set the password on the SMTP server.  I would like to have a password -
> does anyone know how to use the recipe above to set one?

s = smtplib.SMTP()
....
s.login(...,'password')
> 
> Any other useful nudges in the right direction appreciated.
> 
> Many thanks
> 
> Jon

hg





More information about the Python-list mailing list