Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
By passing Outlook message box when sending emails
Message
From
22/02/2005 10:43:12
 
 
To
22/02/2005 10:39:34
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP1
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00987238
Message ID:
00989251
Views:
36
Just in case, here is my SendEmail function which uses Outlook Redemption
Function SendEMail
Lparameters lcTo, lcSubject, lcBody, lcBCC
Local loOutlook, loNameSpace, loFolder, loItem,loSafeItem,lcCurDir

If Type('lcBody') != 'C' Or Type('lcSubject') != 'C' Or Type('lcTo') != 'C'
  Return .F.
Else
  lcCurDir = Sys(5) + Sys(2003)
  If Vartype(lcBCC)#'C'
    lcBCC=''
  Endif
  loOutlook     = Createobject('Outlook.Application')
  loNameSpace   = loOutlook.GetNameSpace('MAPI')
  loSafeItem    = Createobject('redemption.safeMailItem')
  loItem        = loOutlook.Createitem(0)
  With loSafeItem
    .Item=loItem
    .body=lcBody
    .To=lcTo
    .bcc=lcBCC
  Endwith
  With loItem
    .SUBJECT    = lcSubject
    .IMPORTANCE = 1          && 1 = Normal
  Endwith
  loSafeItem.Send
  Cd (lcCurDir)
  Release loItem
  Release loSafeItem
  Release loFolder
  Release loNameSpace
  Release loOutlook
  Release lcCurDir
  Return .T.
Endif
Endfunc
>Thanks. I'll check this out as soon as I have time. Yuri's suggestion is working as a quick fix.
>
>>Check http://www.dimastr.com/redemption/
>>
>>>I have been using your yforceol.exe with Office 2000 to send emails from within another application. All was well. Now I have Office 2003 and the yforceol.exe starts as it should but sending the "Y" doesn't close the warning screen. I tried a "Y" from the keyboard and that doesn't work either. The default comes up with focus on the "No" button and it takes a click on the "Yes" (or tab tab) and an enter. Any suggestions on modifying your program to work with 2003?
Previous
Reply
Map
View

Click here to load this message in the networking platform