Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I create an email from foxpro 2.6 ? 1

Status
Not open for further replies.

hlvorbeck

Programmer
Apr 4, 2001
16
0
0
AR
I need to create an email from a Foxpro 2.6 application. Is it possible ?
How can I do it ?

Thanks, HL
 
The easiest way is probably using vbscript and Outlook, provided the computer has both installed. Otherwise, do a search in this thread and you'll come up with some SMTP and Blat options.
Here is a sample I got from this thread somewhere. Sorry, I can't give proper credit to the author:

------ E:Mail.VBS ------------------------------------------

'To run this in fox, use something like: !/n Wscript email.vbs

set objoutlook=CreateObject("Outlook.Application")
set objmail=objoutlook.CreateItem(0)
objmail.Recipients.Add("sombody@somewhere.com")
objmail.Subject = "Email Script Test"
objmail.cc = "sombodyelse@somewhere.com"
objmail.Body = vbcrlf&" Body Message Here."
objmail.Attachments.Add("c:\autoexec.bat")
objmail.Send
'objoutlook.quit 'uncomment to close outlook
set objmail=nothing
set objoutlook=nothing
------------- to here -----------------------------------



-Dave S.-
[cheers]
Even more Fox stuff at:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top