Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Automating Outlook w/VFP 8.0
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Versions des environnements
Visual FoxPro:
VFP 8
OS:
Windows XP
Network:
Windows NT
Database:
Visual FoxPro
Divers
Thread ID:
01032221
Message ID:
01032943
Vues:
22
If you are not using Microsoft Exchange you wouldn't need these three lines. The first one picks up the information in a string about the From portion or your e-mail, taking in from the registry entry, and the next two lines parses it to get the sender's e-mail address. In your case you can just fill in the From directly with the senders address.

BTW You can also use CDO to send e-mails. CDO does not use Outlook as a transport engine, thus bypassing the security message.


>Can you explain further what is the purpose of these 3 lines:
>
>FromTag = oRedem.GetIDsFromNames("{00020386-0000-0000-C000-000000000046}", "From")
>FromTag = BITOR(FromTag, 0x1E) && VFP Version
>FromTag = ALLTRIM(STR(FromTag,20)) + CHR(0) && Convert to String - PT_STRING8 Format
>
>
>
>>Something like this
>>
>>
#DEFINE MAILITEM 0
>>#DEFINE IMPORTANCELOW 0
>>#DEFINE IMPORTANCENORMAL 1
>>#DEFINE IMPORTANCEHIGH 2
>>
>>oRedem = CREATEOBJECT("Redemption.SafeMailItem")
>>oOutlook = CREATEOBJECT("Outlook.Application")
>>
>>oNS = oOutlook.GetNamespace("MAPI")
>>oNS.Logon
>>
>>* --- Create Capability to Enter ANY From and/or Reply-To Email Address ---
>>* --- Does Not Need To Be Valid Within Outlook or Anywhere ---
>>oRedem.ITEM = oMail
>>FromTag = oRedem.GetIDsFromNames("{00020386-0000-0000-C000-000000000046}", "From")
>>FromTag = BITOR(FromTag, 0x1E)  && VFP Version
>>FromTag = ALLTRIM(STR(FromTag,20)) + CHR(0)  && Convert to String - PT_STRING8 Format
>>
>>WITH oRedem
>>   .ITEM = oMail
>>   .TO = mcEmailAddr
>>   .FIELDS[FromTag] = "Any Email Addr <AnyEmail@WhereverIWant.com>"  && Insert Pseudo FROM:
>>   .ReplyRecipients.ADD("No-Reply <No-Reply@WhereverIWant.com>")   && Insert Pseudo REPLY-TO:
>>   .Subject = mcSubject
>>   .Importance = IMPORTANCENORMAL
>>   .Body = mcBodyMsg
>>   .Attachments.ADD(mcAttach1) && Fully Pathed File Attachment #1
>>   .Attachments.ADD(mcAttach2) && Fully Pathed File Attachment #2
>>   .SEND
>>ENDWITH
>>
>>oNS.Logoff
>>
>>RELEASE oMail
>>RELEASE oNS
>>RELEASE oOutlook
>>RELEASE oRedem
>>
>>
>>>Thanks. I'm not very competent in VB or VB scripting but will try your solution and try to convert the examples to VFP with the downloaded software. Again, thanks.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform