Hi Peter CDO talks directly to the mailservers so bypasses outlook.
Outlook as you know has these annoying quirks with security messages. When sending without Outlook I just bcc them back to me and have an Outlook rule to move the incoming copy into a subfolder, either that or just have a mailbox set aside for confirmations. Saves a lot of messing around with outlook. If you want to automate Outlook I have some code to do that. Set a timer on the form when you start to automate This timer looks for the security message, moves the window off screen and presses the ok Once the timer succeeds it is stopped and the email carries on. I'll dig out some code if you want to have a look. Graham -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Peter Hart Sent: 15 June 2010 15:46 To: GrahamB Subject: RE: Craig Boyds VFPEXMAPI.fll Hi Graham Tried your suggestion and got it working complete with multiple attachments (Which I haven't been able to do with VFPEXMAPI) However there is one problem, the emails don't appear in sent items in Outlook and the client needs this in case he needs proof of sending or he need to re-send. Cheers Peter Peter Hart Computers -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Graham Brown Sent: 15 June 2010 14:18 To: ProFox Email List Subject: RE: Craig Boyds VFPEXMAPI.fll fwiw I use either Outlook with findwindowpos / timer to look for the annoying security message, a web based perl script and IE automation or this code to call cdosys.dll Based on what type of system I've written one of them normally turns out to be the better solution. As far as I know the customer I've lifted this code from is running W7 and not reported any issues. LPARAMETERS cTo,cBCC,cSubject,cBody,cFrom cdoBasic = 1 cdoSendUsingPort = 2 IMSG = Createobject("CDO.Message") iConf = Createobject("CDO.Configuration") Flds = iConf.Fields With Flds IF "JET" $ UPPER(cFrom) .Item("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = cdoBasic .Item("http://schemas.microsoft.com/cdo/configuration/sendusername") = "[email protected]" .Item("http://schemas.microsoft.com/cdo/configuration/sendpassword") = "mypassword" .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = cdoSendUsingPort .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "mail.me.com" .Item("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontime out") = 30 .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25 .Update() ENDIF Endwith With IMSG .Configuration = iConf .To = cTo ** .To="[email protected]" IF "JET" $ UPPER(cFrom) .From = "[email protected]" endif .BCC=cBCC .Subject = cSubject IF "<HTML" $ UPPER(cBody) .htmlbody=cBody ELSE .TextBody = cBody ENDIF .Send() Endwith [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

