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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Send email via Outlook

Status
Not open for further replies.

fox26apgmr

Programmer
Apr 30, 2002
21
0
0
US
Hi,
Is it possible to programatically (FoxpoW 2.6) send an email message with no user intervention. The program would provide the email address, the subject and the message text.
Thanks, Joe
 
Hi,
If you're referring to the code in Article 102467, it brings up a Send Note dialog box which requires user intervention. Do you mean using BLAT or GBmail?
 
I am sorry, I was referring to the code in that article, thinking it would do what you were asking for, but I have never used it. What I did use sometime ago was BLAT, and as far as I can recall, it didn't require user intervention.
 
I've never used BLAT and according to that thread, It's not for FoxproW. It says: For FoxPro for DOS, do a search here on BLAT - this is a DOS only solution for sending messages.
 
I used the vbscript in thread 182-674134 and it seems to have worked!
 
I am glad you found a solution that works for you.

This is the vbscript code from thread182-674134:
Code:
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top