Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
E-Mailing From VFP5 Form Through Outlook Express
Message
 
 
À
23/04/1999 11:02:57
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00211435
Message ID:
00212012
Vues:
40
Jeff,

You can either just automate this and use the other argument to Send to allow the user to type the mail content.

There is another technique that works well too:
* mailto.prg 06-28-98

* this function initiates the default email client

* 29-Jun-98 added clauses based on KB article about IE4

lparameters pcRecipient, pcSubject, pcBody, pcCC, pcBCC

local oShell, lcRecipient, lcSubject, lcBody, lcCC, lcBCC, lnRetVal

if ( type( "pcRecipient" ) != "C" )
   lcRecipient = ""
else
   lcRecipient = alltrim( pcRecipient )
endif

if ( type( "pcSubject" ) != "C" )
   lcSubject = ""
else
   lcSubject = "?subject=" + pcSubject
endif

if ( type( "pcBody" ) != "C" )
   lcBody = ""
else
   lcBody = "&body=" + strtran( alltrim( pcBody ), chr(13), "%0d" )
   lcBody = strtran( lcBody, chr(10), "%0a" )
endif

if ( type( "pcCC" ) != "C" )
   lcCC = ""
else
   lcCC = "&cc=" + alltrim( pcCC )
endif

if ( type( "pcBCC" ) != "C" )
   lcBCC = ""
else
   lcBCC = "&bcc=" + alltrim( pcBCC )
endif

set classlib to dfwinapi additive

oShell = createobject( "ShellExecute" )
with oShell
   .mcDocApp = "mailto:" + lcRecipient + lcSubject + lcCC + lcBCC + lcBody
   lnRetVal = .Execute()
endwith

return ( lnRetVal = 0 )
>I have used mapi to automate the mail service but what i would like to do is programatically gather the names of the recipients and then launch outlook with the recipients prefilled. Has anyone tackled this one? Thanks Jeff
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform