Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Email/Web Site Nav
Message
 
 
À
05/05/1999 18:20:04
Jim Rieck
Quicken Loans/Rock Financial/Title Sourc
Livonia, Michigan, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Classes - VCX
Divers
Thread ID:
00214551
Message ID:
00215588
Vues:
32
Jim,

mailto: does not support file attachments directly. Here's everything you can do with mailto:
* 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 came across your message from a couple of days ago on incorporating email into applications. Thanks, it's cool. Just one other question. How would I automatically attach a file and set the subject of the email message? Also, where could I find documentation on the shell.application object?
>
>Any answers would be great, Thanks
df (was a 10 time MVP)

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

Click here to load this message in the networking platform