Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Security message in Outlook
Message
From
21/02/2005 15:44:31
 
 
To
21/02/2005 15:28:14
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 7 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00988795
Message ID:
00989005
Views:
60
>>>>Did you read the documentation?
>>>>
>>>what documentation?
>>
>>Click the Redemption Objects and the Miscellaneous Redemption objects links. If you are familiar with Outlook automation, the conversion from VB code to VFP code is very easy.
>
>what does that mean and how to do it in vfp:
>
>PrSenderEmail = &H0C1F001E
>?sItem.Fields(PrSenderEmail)
>
>
&H0C1F001E is a hexadecimal value, in VFP you use the form 0x... in stead of &H..., so &H0C1F001E in VB equals 0x0C1F001E in VFP. 0x0C1F001E equals 203358238. It is common to use hexadecimal values as constants (for some reason). The most usual way to use these kind of constants is to #DEFINE them.
#DEFINE PrSenderEmail 0x0C1F001E
?sItem.Fields(PrSenderEmail)
Note that you can not use #DEFINE in the command window.

UPDATE:
Here is an excerpt from my procedure to send emails from Outlook, using Outlook Redemption to overcome the security warning. I hope it will give you some valuable tips.
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform