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
 



_______________________________________________
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/a57fa4cf19531343a2ee11b57db8e3af100...@server.peterhartcomputers.local
** 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.

Reply via email to