Home > Archive > Programming with dBASE > April 2005 > Email client, how to









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Email client, how to
clee

2005-04-28, 9:23 am

I have an email field in a dbase application. I want the user to double click the field, and the program will take the field's mail address value and plonk it onto the default email client (could me anything) that's installed in the user's windows progra
m. How do I this?

thanks.

Hans-Peter Neuwirth

2005-04-28, 9:23 am

clee wrote:
> I have an email field in a dbase application. I want the user to
> double click the field, and the program will take the field's mail
> address value and plonk it onto the default email client


cMailString could be only eMailAddress, eMailAddress+subject
or
eMailAddress+subject
+body

ShellExecute(_app.framewin. hwnd,'open',cMailStr
ing,NULL,NULL,1)

hpn

--
dBKON Europe 2005 - The European dBASE Developers and
Users Conference on June 3 and 4, 2005
Latest Infos on: www.dbkon.org
dBASE User Group D-A-CH: www.dbasegroup.org / net / de / at / ch
dBASE Journal: www.dbase-journal.de

clee

2005-04-28, 9:23 am

Hans-Peter Neuwirth Wrote:

> clee wrote:
>
> cMailString could be only eMailAddress, eMailAddress+subject
or
> eMailAddress+subject
+body
>
> ShellExecute(_app.framewin. hwnd,'open',cMailStr
ing,NULL,NULL,1)
>
> hpn
>



Thanks. But I get the error message "Shellexecute.prg doesn't exist".
Am I missing something?



> --
> dBKON Europe 2005 - The European dBASE Developers and
> Users Conference on June 3 and 4, 2005
> Latest Infos on: www.dbkon.org
> dBASE User Group D-A-CH: www.dbasegroup.org / net / de / at / ch
> dBASE Journal: www.dbase-journal.de
>


Hans-Peter Neuwirth

2005-04-28, 9:23 am

>
> Thanks. But I get the error message "Shellexecute.prg doesn't exist".
> Am I missing something?
>


Sorry, that was my fault. The declaration of the external is missing

EXTERN cHandle ShellExecute(chandle
, cstring, cstring,;
cstring, cstring, cint) shell32 from 'ShellExecuteA'

ShellExecute(_app.framewin. hwnd,'open',cMailStr
ing,NULL,NULL,1)

hpn

--
dBKON Europe 2005 - International dBASE Developers and
Users Conference on June 3 and 4, 2005
Latest Infos on: www.dbkon.org
dBASE User Group D-A-CH: www.dbasegroup.org / net / de / at / ch
dBASE Journal: www.dbase-journal.de
clee

2005-04-28, 11:23 am

Hans-Peter Neuwirth Wrote:

>
> Sorry, that was my fault. The declaration of the external is missing
>
> EXTERN cHandle ShellExecute(chandle
, cstring, cstring,;
> cstring, cstring, cint) shell32 from 'ShellExecuteA'
>
> ShellExecute(_app.framewin. hwnd,'open',cMailStr
ing,NULL,NULL,1)
>


Just tried it. No error message this time, but nothing happens...


clee

2005-04-28, 11:23 am

I did this from the Dbase command line but nothing happened.

clee Wrote:

> Hans-Peter Neuwirth Wrote:
>
>
> Just tried it. No error message this time, but nothing happens...
>
>


Bowen Moursund [DataTech]

2005-04-29, 8:24 pm

>> EXTERN cHandle ShellExecute(chandle
, cstring, cstring,;
>
> Just tried it. No error message this time, but nothing happens...


cMailString should be built like a mailto, e.g.:

cMailString = ;
"mailto:duke@dbase.com?subject=Bite%20Me!? body=Refer%20to%20su
bject,%20Dork."

http://msdn.microsoft.com/library/d...ined/mailto.asp


--
Bowen Moursund
DataTech
Consulting & Development
http://www.bmmnet.us

clee

2005-04-30, 9:23 am

Thanks for the solution, it works now.

One more question on handling windows handles: is there a way to invoke windows' copy file and paste file functions within Dbase?


Bowen Moursund [DataTech] Wrote:

>
> cMailString should be built like a mailto, e.g.:
>
> cMailString = ;
> "mailto:duke@dbase.com?subject=Bite%20Me!? body=Refer%20to%20su
bject,%20Dork."
>
> http://msdn.microsoft.com/library/d...ined/mailto.asp
>
>
> --
> Bowen Moursund
> DataTech
> Consulting & Development
> http://www.bmmnet.us
>


Bowen Moursund [DataTech]

2005-04-30, 11:23 am

> is there a way to invoke windows' copy file and paste file functions
> within Dbase?


Probably, although Windows Scripting might be a better solution. I suggest
that you post your question in the dbase.dde-ole-dll-winapi group.


--
Bowen Moursund
DataTech
Consulting & Development
http://www.bmmnet.us



Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com