User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Shell Scripting section within the Software Development category of DaniWeb, a massive community of 422,640 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,681 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Shell Scripting advertiser: Programming Forums
Views: 489 | Replies: 0
Reply
Join Date: May 2007
Posts: 25
Reputation: CodyOebel is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 2
CodyOebel CodyOebel is offline Offline
Light Poster

A script to write an email with a problem!

  #1  
Jan 27th, 2008
Im developing an application console based in c++ , and needed a quick and easy way to script an outlook email. I found the below script to use which works great, but for one problem.
PROBLEM:

When the script is ran, outlook prompts me to let me know an application is useing itself and it could be a virus of some type and gives me three options. I need this to be fully automated without the prompts.. e.g script runs email gets sent nothing more! Can someone help me.. I dont know alot about scripting.



Dim theApp, theMailItem

Set theApp = WScript.CreateObject("Outlook.Application")
Set theNameSpace = theApp.GetNameSpace("MAPI")

Set theMailItem = theApp.CreateItem(0)

theMailItem.Recipients.Add "genGOTCHA@yahoo.com"
theMailItem.Subject = "TESTING EMAIL"
theMailItem.Body = "I GOSH I THINK IT WORKED"
theMailItem.Send
theNameSpace.Logoff
Name: Cody Oebel
Place : San Antonio , TX.
AddThis Social Bookmark Button
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Shell Scripting Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Shell Scripting Forum

All times are GMT -4. The time now is 3:26 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC