Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Email - HELP!
Message
From
30/10/1998 12:03:44
Ian Matthews
Up & Running Technologies Inc
Chestermere, Alberta, Canada
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00149120
Message ID:
00152876
Views:
27
Thanx!

I will give you credit for this code in my code.

>Ian,
>
>Here's some code I wrote. It uses the ShellExecute() wrapper that's available on my website in the spyin.zip file.
>
>
* 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
>
>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
>   .Execute()
>endwith
>
>
>
>>I want to have a button on a form that when clicked will launch the users default email program (Windows based) and enters the email address from a field in a table.
>>
>>I beleive I can do this with the RUN command but I can not figure out what the coding is use for the default email program.
>>
>>Why is there not a nice MAILTO: function????
>>
>>HELP!!!
Previous
Reply
Map
View

Click here to load this message in the networking platform