Script To Send Email Adress

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: May 2007
Posts: 39
Reputation: CodyOebel is an unknown quantity at this point 
Solved Threads: 2
CodyOebel CodyOebel is offline Offline
Light Poster

Script To Send Email Adress

 
0
  #1
Jan 27th, 2008
Ok so Im onto my next step.. Ive used c++ to read in an entire file, and got what I needed. The last and final step is to send the information in an email via my already setup outlook account.
The below code works, and I dont know jack about .vbs scripts (THis is c++ related) but I guess is also scripting as well.
PROBLEM: Ok this script works for the exception that outlook prompts me with
two windows saying "An application is trying to access your outlook " and " This could be a potential threat do you wish to allow this program"

Is there any switches that could be added in order to bypass these prompts?

  1. Dim theApp, theMailItem
  2.  
  3. Set theApp = WScript.CreateObject("Outlook.Application")
  4. Set theNameSpace = theApp.GetNameSpace("MAPI")
  5.  
  6. Set theMailItem = theApp.CreateItem(0)
  7.  
  8. theMailItem.Recipients.Add "genGOTCHA@yahoo.com"
  9. theMailItem.Subject = "TESTING EMAIL"
  10. theMailItem.Body = "I GOSH I THINK IT WORKED"
  11. theMailItem.Send
  12. theNameSpace.Logoff
Name: Cody Oebel
Place : San Antonio , TX.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,500
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1479
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: Script To Send Email Adress

 
0
  #2
Jan 27th, 2008
You might read this, especially the comments at the end of the window about SendMessage command-line function. I don't have Outlook on my computer so I can't test it.
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C++ Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC