Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Sending An Email

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,41678
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Sending An Email
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Sending An Email - 1/4/2007 1:33:20 AM   
  StylinLancer


Posts: 57
Score: 0
Joined: 10/4/2006
Status: offline
I need some direction as to where to look for help to send an email using vbscript. I did find some examples for sending emails based on smtp, but I'm using an exchange server, not sure if they go hand in hand or not.

Below is some code I currently use within Outlook to accomplish this. I would like to attempt this in vbsript. Any suggestions?


      
 
 
Post #: 1
 
 RE: Sending An Email - 1/4/2007 2:41:41 AM   
  ebgreen


Posts: 5246
Score: 31
Joined: 7/12/2005
Status: offline
Two things. First, have you tried the script examples that you found? Second, you can convert VBA to VBS. You should be able to find some articles on the differences via google.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to StylinLancer)
 
 
Post #: 2
 
 RE: Sending An Email - 1/4/2007 2:44:59 AM   
  StylinLancer


Posts: 57
Score: 0
Joined: 10/4/2006
Status: offline
Yes here is one of the examples I tried. It blew up on the last line.

Error = The "SendUsing" configuration value is invalid


      

(in reply to ebgreen)
 
 
Post #: 3
 
 RE: Sending An Email - 1/4/2007 3:21:08 AM   
  StylinLancer


Posts: 57
Score: 0
Joined: 10/4/2006
Status: offline
Heres something I just found. It at least works for the most part. Once running, Outlook pops up 3 message stating a program is trying to access your address book and a program is sending an email, etc. Is there anyway to get rid of these messages?


      

(in reply to StylinLancer)
 
 
Post #: 4
 
 RE: Sending An Email - 1/4/2007 3:25:14 AM   
  ebgreen


Posts: 5246
Score: 31
Joined: 7/12/2005
Status: offline
That is part of the Outlook security model. There are third party apps that you can buy to remove them but other than that, the answer is no.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to StylinLancer)
 
 
Post #: 5
 
 RE: Sending An Email - 1/4/2007 4:14:50 AM   
  StylinLancer


Posts: 57
Score: 0
Joined: 10/4/2006
Status: offline
So in reality, its pointless to use vbs to send an email in Outlook and just stick with the vba code I have currently?

(in reply to ebgreen)
 
 
Post #: 6
 
 RE: Sending An Email - 1/4/2007 4:21:59 AM   
  ebgreen


Posts: 5246
Score: 31
Joined: 7/12/2005
Status: offline
Maybe. Whay exactly did you want to move it out to VBS? What is wrong with the VBA that you already have?

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to StylinLancer)
 
 
Post #: 7
 
 RE: Sending An Email - 1/4/2007 4:33:12 AM   
  StylinLancer


Posts: 57
Score: 0
Joined: 10/4/2006
Status: offline
The code I posted above is what I wanted to move out of vba and into vbs. I'm trying to learn vbs rather than using vba. I've used vba for years now and I'm just getting tired of it to be honest. So I thought I would try and convert most of my vba code into vbs, which alot of my code has worked but the outlook code is the granddaddy of code.

< Message edited by StylinLancer -- 1/4/2007 4:36:52 AM >

(in reply to ebgreen)
 
 
Post #: 8
 
 RE: Sending An Email - 1/4/2007 4:42:25 AM   
  ebgreen


Posts: 5246
Score: 31
Joined: 7/12/2005
Status: offline
Aah...in that case, it may be better to look for something else for a learning experience. It is my personal opinion that since VBS is one step further removed from the app than VBA then VBA is typically a better solution to MS Office automation when it is available.

_____________________________

"... when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick
Goog places to start:http://www.visualbasicscript.com/m_24727/tm.htm
http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to StylinLancer)
 
 
Post #: 9
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Sending An Email Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts