Thanks to the 2 people who've replied; it's been a little harder than I
thought to use outlook, but I'll get the hang of it, and I sincerely  thank
you both.
THX,
Brandon McGinty



----------
Feel free to contact me for technical support, or just to chat; I always
have time to talk and help, and an open ear.
Email:[EMAIL PROTECTED]
Skype:brandon.mcginty
Msn:[EMAIL PROTECTED]
Aim:brandonmcginty (Not currently available.)
Cell:4802025790 (Weekends and nights only, please.)
"Kindness is a language that the deaf can hear and the blind can see."
Mark Twain


> -----Original Message-----
> From: 
> [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED]
> rg] On Behalf Of Daniel Dittmar
> Sent: Tuesday, April 04, 2006 1:23 AM
> To: python-list@python.org
> Subject: Re: Python and microsoft outlook-using com,can I 
> interact with msoutlook?
> 
> 
> [EMAIL PROTECTED] wrote:
> > Hi All,
> > I know that Microsoft Exchange has a com interface, CDO, 
> but I can't seem to
> > find one for Microsoft outlook.
> > does anyone have code snippets for using msoutlook and python, or
> > suggestions?
> 
> You can use CDO to manage your Inbox, send mail etc.
> 
> The following functions navigate to a certain folder and parse every 
> message text for a certain regular expression:
> 
> def spamstat ():
>      s = Dispatch ("Mapi.Session")
>      s.Logon ("Default Outlook Profile")
>      junk = findJunk (s)
>      rex = re.compile ('The ([0-9]+) emails listed below')
>      for msg in junk.Messages:
>          text = msg.Text
>          match = rex.search (text)
>          if match:
>              date = parseDate (msg.TimeSent)
>              print (date, int (match.group (1)))
> 
> def findJunk (s):
>      inbox = s.Inbox
>      for folder in s.Inbox.Folders:
>          if folder.Name == 'Junk':
>              return folder
> 
> 
> See the Spambayes Outlook plugin 
> (http://spambayes.sourceforge.net/) for 
> a complex example.
> 
> Daniel
> -- 
> http://mail.python.org/mailman/listinfo/python-list
> 
> -- 
> No virus found in this incoming message.
> Checked by AVG Free Edition.
> Version: 7.1.385 / Virus Database: 268.3.5/301 - Release 
> Date: 4/4/2006
>  
> 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.3.5/301 - Release Date: 4/4/2006
 

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to