Re: ctypes NULL pointers; was: Python To Send Emails Via Outlook Express

2005-01-03 Thread ian
Hi Lenard Hopefully I have understood you properly. The updated script is now as follows, or you can download it from http://www.kirbyfooty.com/simplemapi.py Thanks again for all your help!!! Kindest regards Ian Cook -- impo

Re: ctypes NULL pointers; was: Python To Send Emails Via Outlook Express

2005-01-02 Thread Michel Claveau - abstraction méta-galactique non triviale en fuite perpétuelle.
Ok ; thank you. -- http://mail.python.org/mailman/listinfo/python-list

Re: ctypes NULL pointers; was: Python To Send Emails Via Outlook Express

2005-01-02 Thread ian
Thanks again Lenard!! -- http://mail.python.org/mailman/listinfo/python-list

ctypes NULL pointers; was: Python To Send Emails Via Outlook Express

2005-01-02 Thread Lenard Lindstrom
Posted in a previous thread was some Python code for accessing Window's Simple MAPI api using the ctypes module. http://groups-beta.google.com/group/comp.lang.python/msg/56fa74cdba9b7be9 This Simple MAPI module was Ian's completed version of an example I had posted in an earlier message. In it I

Re: Python To Send Emails Via Outlook Express

2004-12-27 Thread Steve Holden
[EMAIL PROTECTED] wrote: Hi David, I'd be happy to post it to python-win32 but don't know how. Ian Send mail to [EMAIL PROTECTED] If you want to see it arrive you might join the list beforehand - go to www.python.org and follow the "Mailing Lists" link to find out how to subscribe. regards St

Re: Python To Send Emails Via Outlook Express

2004-12-25 Thread ian
Hi David, I'd be happy to post it to python-win32 but don't know how. Ian -- http://mail.python.org/mailman/listinfo/python-list

Re: Python To Send Emails Via Outlook Express

2004-12-25 Thread David Fraser
[EMAIL PROTECTED] wrote: Hey guys, I'm just thankful the answer has been found and hope this helps someone else. To everyone (especially Lenard) that responded to my request for help, thank you!! Merry Christmas everyone!!! God bless Ian Thanks Ian, Why not post this to the python-win32 mailing lis

Re: Python To Send Emails Via Outlook Express

2004-12-25 Thread Max M
Steve Holden wrote: Max M wrote: Lenard Lindstrom wrote: So what is this, some kind of competition? If you really though Lenard's quoting was a sin (since I took your remarks to be sardonic), how much more so was your gratuitous repetition thereof? I thought that showing by example might have a

Re: Python To Send Emails Via Outlook Express

2004-12-24 Thread ian
Hey guys, I'm just thankful the answer has been found and hope this helps someone else. To everyone (especially Lenard) that responded to my request for help, thank you!! Merry Christmas everyone!!! God bless Ian -- http://mail.python.org/mailman/listinfo/python-list

Re: Python To Send Emails Via Outlook Express

2004-12-24 Thread Steve Holden
Max M wrote: Lenard Lindstrom wrote: [EMAIL PROTECTED] writes: [sixty or more lines, mostly code ...] Looks good. Lenard Lindstrom Nice quoting So what is this, some kind of competition? If you really though Lenard's quoting was a sin (since I took your remarks to be sardonic), how much more so

Re: Python To Send Emails Via Outlook Express

2004-12-24 Thread Max M
Lenard Lindstrom wrote: [EMAIL PROTECTED] writes: Hi Lenard, You just beat me to it. Suprise, suprise, I discovered the answer myself this time. I have modified the script to allow the attachment(s) to still be passed as a string. Some error checking is also done to verify the attachment file exis

Re: Python To Send Emails Via Outlook Express

2004-12-24 Thread Lenard Lindstrom
[EMAIL PROTECTED] writes: > Hi Lenard, > You just beat me to it. > Suprise, suprise, I discovered the answer myself this time. > > I have modified the script to allow the attachment(s) to still be > passed as a string. > Some error checking is also done to verify the attachment file exists. > >

Re: Python To Send Emails Via Outlook Express

2004-12-23 Thread ian
I wish I new why google doesn't show nicely aligned python code when you paste the script. Anyways, in case this helps someone else you can download the script from http://www.kirbyfooty.com/simplemapi.py Ian -- http://mail.python.org/mailman/listinfo/python-list

Re: Python To Send Emails Via Outlook Express

2004-12-23 Thread ian
Hi Lenard, You just beat me to it. Suprise, suprise, I discovered the answer myself this time. I have modified the script to allow the attachment(s) to still be passed as a string. Some error checking is also done to verify the attachment file exists. I have also modified it so it can be used for

Re: Python To Send Emails Via Outlook Express

2004-12-23 Thread Lenard Lindstrom
[EMAIL PROTECTED] writes: > Hello again, > Thanks for the advice! > Unfortunately I still cannot get it to send attachments. > It comes up with the following windows error.. > (I have a feeling it has something to do with the file count) > > >>> import simplemapi > >>> simplemapi.SendMail("[EMAIL

Re: Python To Send Emails Via Outlook Express

2004-12-23 Thread ian
Hello again, Thanks for the advice! Unfortunately I still cannot get it to send attachments. It comes up with the following windows error.. (I have a feeling it has something to do with the file count) >>> import simplemapi >>> simplemapi.SendMail("[EMAIL PROTECTED]","The Subject","The body","c:\i

Re: Python To Send Emails Via Outlook Express

2004-12-23 Thread Lenard Lindstrom
[EMAIL PROTECTED] writes: > Hi Lenard, > > As the risk of severely embarassing myself can I ask for your help one > more time. > I have tried changing your script to include attachments, but guess > what, (and this should come as no suprise) I can't do it. > So > Here is my feeble attempt at

Re: Python To Send Emails Via Outlook Express

2004-12-22 Thread ian
Hi Lenard, As the risk of severely embarassing myself can I ask for your help one more time. I have tried changing your script to include attachments, but guess what, (and this should come as no suprise) I can't do it. So Here is my feeble attempt at changing the script.. -

Re: Python To Send Emails Via Outlook Express

2004-12-22 Thread Lenard Lindstrom
[EMAIL PROTECTED] writes: > Hi Lenard, > Absolutely fantastic!! > That worked like a charm. > Now onto adapting it to send attachments. > Glad to be of help. Lenard Lindstrom -- http://mail.python.org/mailman/listinfo/python-list

Re: Python To Send Emails Via Outlook Express

2004-12-22 Thread ian
Hi Lenard, Absolutely fantastic!! That worked like a charm. Now onto adapting it to send attachments. Thanks again Ian -- http://mail.python.org/mailman/listinfo/python-list

Re: Python To Send Emails Via Outlook Express

2004-12-22 Thread ian
Hi Lenard, Absolutely fantastic!! That worked like a charm. Now onto adapting it to send attachments. Thanks again Ian -- http://mail.python.org/mailman/listinfo/python-list

Re: Python To Send Emails Via Outlook Express

2004-12-21 Thread Lenard Lindstrom
[EMAIL PROTECTED] writes: > That sound really promising. Is there any chance you could forward me a > copy of the script. I'm still very new to Python and it would help me a > lot. > Thanks again > > Ian This is a simple example I have put together: === SimpleMAPI.py ===

Re: Python To Send Emails Via Outlook Express

2004-12-21 Thread ian
That sound really promising. Is there any chance you could forward me a copy of the script. I'm still very new to Python and it would help me a lot. Thanks again Ian -- http://mail.python.org/mailman/listinfo/python-list

Re: Python To Send Emails Via Outlook Express

2004-12-21 Thread Lenard Lindstrom
Steve Holden <[EMAIL PROTECTED]> writes: > [EMAIL PROTECTED] wrote: > > > Hi Fredrik, > > Thank you for the suggestion. > > I tried different from/to settings and guess what? The mail came > > thru. > > The script is now.. > > import win32com.client > > s = win32com.client.Dispatch('CDO.Message')

Re: Python To Send Emails Via Outlook Express

2004-12-21 Thread ian
Heavy sigh... == This script WILL send the email import win32com.client s = win32com.client.Dispatch('CDO.Message') c = win32com.client.Dispatch('CDO.Configuration') cdoSourceOutlookExpress = 2 c.Load(cdoSourceOutlookExpress) s.Configuration = c s.From = "[EMAIL PROTECTED]" s.To = "[EMAIL P

Re: Python To Send Emails Via Outlook Express

2004-12-20 Thread Ganesan R
> "ian" == ian <[EMAIL PROTECTED]> writes: > Hi Ganesan, > I'm on the verge of giving up > I don't suppose you could write a small script to send the email for me > via the default windows email client. I can see no easy way to do this. Though you can access the default mail client using a

Re: Python To Send Emails Via Outlook Express

2004-12-20 Thread ian
Hi Ganesan, I'm on the verge of giving up I don't suppose you could write a small script to send the email for me via the default windows email client. I will then try running your script and my end to see if it works ok. I may have missed something and would really appreciate your help. Thanks in

Re: Python To Send Emails Via Outlook Express

2004-12-20 Thread Ganesan R
> "ian" == ian <[EMAIL PROTECTED]> writes: > Hi Max, > Thanks for the suggestion. I'm always open to new ideas. > Can you please tell me how to retrieve the default account settings > from Outlook Express? s.Configuration.Load(2) is supposed to do exactly that. I have no clue why that didn'

Re: Python To Send Emails Via Outlook Express

2004-12-20 Thread Chris
I'm a newbie (oh no I can here you say another one...) How can I get Python to send emails using the default windows email client (eg outlook express)? I thought I could just do the following import win32com.client s = win32com.client.Dispatch('CDO.Message') s.From = "[EMAIL PROTECTED]" s.To =

Re: Python To Send Emails Via Outlook Express

2004-12-20 Thread ian
Hi Max, Thanks for the suggestion. I'm always open to new ideas. Can you please tell me how to retrieve the default account settings from Outlook Express? Ian -- http://mail.python.org/mailman/listinfo/python-list

Re: Python To Send Emails Via Outlook Express

2004-12-20 Thread Max M
[EMAIL PROTECTED] wrote: Hi Steve, When it comes to sending emails the user has the option of sending them via smtp, or via there email client (eg outlook express). I prefer the send method as this makes setting up the email parameters a lot easier for the user. If Outlook Express cannot be autom

Re: Python To Send Emails Via Outlook Express

2004-12-20 Thread ian
Hi Steve, > Why the insistence on using Outlook Express, is you don;t mind me asking? Good question. The problem is that I have a developed a freeware application called Kirby Alarm And Task Scheduler (see www.kirbyfooty.com). The program can pop up a note, run a program, play a sound, or send an e

Re: Python To Send Emails Via Outlook Express

2004-12-20 Thread Steve Holden
[EMAIL PROTECTED] wrote: Hi Fredrik, Thank you for the suggestion. I tried different from/to settings and guess what? The mail came thru. The script is now.. import win32com.client s = win32com.client.Dispatch('CDO.Message') s.From = "[EMAIL PROTECTED]"(was "[EMAIL P

Re: Python To Send Emails Via Outlook Express

2004-12-20 Thread Ganesan R
> "ian" == ian <[EMAIL PROTECTED]> writes: > Hi Ganesan > Wow, I'm REALLY impressed with the high level of support in this forum. > (Another great reason to continue learning Python Well, I am a Linux guy myself. I experimented with win32com a bit a couple of weeks back, so I am trying my i

Re: Python To Send Emails Via Outlook Express

2004-12-20 Thread ian
Hi Ganesan Wow, I'm REALLY impressed with the high level of support in this forum. (Another great reason to continue learning Python I tried what you suggested. After trying a different from/to address the message is sent. But it is NOT sent via Outlook Express. I would appreciate any other sug

Re: Python To Send Emails Via Outlook Express

2004-12-20 Thread Ganesan R
> "ian" == ian <[EMAIL PROTECTED]> writes: > But all I want to do is use Python to instruct Outlook Express to send an > email. That way the user would not have to do any setting up etc of the > mail server properties etc and Outlook Express will magage all the > connection side of things.

Re: Python To Send Emails Via Outlook Express

2004-12-20 Thread ian
Hi Fredrik, Thank you for the suggestion. I tried different from/to settings and guess what? The mail came thru. The script is now.. import win32com.client s = win32com.client.Dispatch('CDO.Message') s.From = "[EMAIL PROTECTED]"(was "[EMAIL PROTECTED]") s.To = "[E

Re: Python To Send Emails Via Outlook Express

2004-12-19 Thread ian
llent There has to be a way for Python to send emails via Outlook Express Kind regards Ian PS Here is the working script for sending emails via SMTP.. - # Import smtplib for the a

Re: Python To Send Emails Via Outlook Express

2004-12-19 Thread Fredrik Lundh
<[EMAIL PROTECTED]> wrote: > But all I want to do is use Python to instruct Outlook Express to send > an email. and you succeeded -- the error message you saw came from the mail server, not outlook itself. your problem is that the server didn't like the mail you sent; checking the server config

Re: Python To Send Emails Via Outlook Express

2004-12-19 Thread Max M
[EMAIL PROTECTED] wrote: Thanks Fredrik, That was my first impression too. But all I want to do is use Python to instruct Outlook Express to send an email. Which you did! From the look of the traceback. But your mailserver is configured in such a way that you cannot send mail from your machine us

Re: Python To Send Emails Via Outlook Express

2004-12-19 Thread Keith Dart
[EMAIL PROTECTED] wrote: Hi Ganesan I tried changing s.Send to s.Send(). It now comes up with an exception error.. The details are below. Looks like the COM part works, but sending mail has an error from the SMTP host. But, slightly off topic, FYI, Python can send email directly with the email an

Re: Python To Send Emails Via Outlook Express

2004-12-19 Thread ian
Thanks Fredrik, That was my first impression too. But all I want to do is use Python to instruct Outlook Express to send an email. That way the user would not have to do any setting up etc of the mail server properties etc and Outlook Express will magage all the connection side of things. I have

Re: Python To Send Emails Via Outlook Express

2004-12-19 Thread Fredrik Lundh
<[EMAIL PROTECTED]> wrote: > I tried changing s.Send to s.Send(). It now comes up with an exception > error.. > com_error: (-2147352567, 'Exception occurred.', (0, None, 'The server > rejected one or more recipient addresses. The server response was: 554 > <[EMAIL PROTECTED]>: Relay access denied

Re: Python To Send Emails Via Outlook Express

2004-12-19 Thread ian
Hi Ganesan I tried changing s.Send to s.Send(). It now comes up with an exception error.. The details are below. Ian Traceback (most recent call last): File "C:\Python23\Lib\site-packages\pythonwin\pywin\framework\scriptutils.py", line 307, in RunScript debugger.run(codeObject, __main__.__dict__

Re: Python To Send Emails Via Outlook Express

2004-12-19 Thread Ganesan R
> "ian" == ian <[EMAIL PROTECTED]> writes: > import win32com.client > s = win32com.client.Dispatch('CDO.Message') > s.From = "[EMAIL PROTECTED]" > s.To = "[EMAIL PROTECTED]" > s.Subject = "The subject" > s.Send > ... but nothing happens. > What am I doing wrong? Does anyone have some sampl

Python To Send Emails Via Outlook Express

2004-12-19 Thread ian
Hi, I'm a newbie (oh no I can here you say another one...) How can I get Python to send emails using the default windows email client (eg outlook express)? I thought I could just do the following import win32com.client s = win32com.client.Dispatch('CDO.Message') s.From = "[EMAIL PROTECTED]"