Hi mani..
If you read between the lines, I said "My script is not processed thru ASP.." It's a VBscript (VBS file)
rgrds
Main Topics
Browse All TopicsHello I need to know if there is a way to send e-mail thru VBS to SMTP(like CDONTs ) My script is not processed thru ASP, the VB script will run on the same machine... I need @ least 2 examples 1 to SMTP and one thru outlook with working codes for an NT 4.0 server box(no 3rd parties soft) that's why I gave it 222 pnts
TNX..
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Just a heads up, but Outlook was never designed to run from a service. If no prompting for a profile and running from VBS is one of your requirements, then you would want to use Collaboration Data Objects (CDO)*.
--- BEGIN VB Example ---
Sub Main()
' How to write a Visual Basic Active Messaging App that can be run
' from the Windows NT Schedule Service.
' --------------------------
' To demonstrate this functionality, the Schedule Service MUST be
' run in the context of a USER ACCOUNT (not the system account.)
' To set the Schedule Service Context:
' - From the Control Panel select the Services icon
' - Scroll down and single click the Schedule Service
' - Single click the Startup button
' - Select "This Account", and enter YOURDOMAIN\YOURACCOUNT
' - It is also suggested that Startup be Manual
'
' With this done, choose the Start button (you should see a dialog box
' indicating success). Close the Control Panel.
'
' Now you need to schedule the application to execute. To do this:
' - From the Start Menu choose Run
' - At the prompt, enter "AT HH:MM PATH\MYEXE.EXE" where
' * HH:MM is the time the application is to execute. This is a 24
' hour clock, and time is based on the system clock.
' * PATH\MYEXE.EXE is path and filename of your EXE.
'
SendScheduledMsg
End Sub
Sub SendScheduledMsg()
'Setup variables for use
Dim objSession As MAPI.Session
Dim objMsg As Message
Dim objRecip As Recipient
'Create Session and Logon
Set objSession = CreateObject("mapi.session
objSession.Logon _
nomail:=True, _
profileinfo:="YOURSERVER" & vbLf & "YOURMAILBOX"
'Create new Message and set properties.
Set objMsg = _
objSession.Outbox.Messages
Subject:="This is a Message Sent From a Scheduled Service", _
Text:="This is a test")
'Add a Recipient.
Set objRecip = objMsg.Recipients.Add(Name
objRecip.Resolve
'Send the Message and Logoff.
objMsg.Send
objSession.Logoff
'Cleanup
Set objRecip = Nothing
Set objMsg = Nothing
Set objSession = Nothing
End Sub
--- END VB EXAMPLE ---
Note: To use from VBScript, you would have to change the explicit DIM statements to just DIM somevariable.
*The CDO library comes with Outlook 98 and Outlook 2000.
And here is your CDONTS example.
--- BEGIN WSH/VBScript Example ---
Dim myCDONTSMail
Dim strFrom
Dim strTo
Dim strReply_To
Dim strSubject
Dim strMessage
strFrom = "Sender@Company.com"
strTo = "Recipient@Company.com"
strReply_To = "Reply-To<Reply_To@Company
strSubject = "This is the Subject"
strBody = "This is the message body."
' Create the CDONTS NewMail object
Set myCDONTSMail = WScript.CreateObject("CDON
' Set the Reply-To header of the Newmail object:
myCDONTSMail.Value("Reply-
' Send the message and cleanup CDONTS objects
myCDONTSMail.Send strFrom, strTo, strSubject, strMessage
Set myCDONTSMail = Nothing
--- End WSH/VBScript Example ---
I am trying to do exactly that - but it doesn't work!!!
I am calling a vbs which creates a cdonts message just like your example (without the reply-to header), and it works when I run from the command line (logged on as an admin with a mailbox)
But when call it from an asp or from the AT scheduler it gives an error!
I use a Win2k server (SBS2000)
I can't work out what account it is trying to send from when called from asp (with authentication) or from AT (Service?)
I read of an exchange 2000 SP3 mod which causes problems - I want to add the account used by the asp to send
http://support.microsoft.c
How do I work out the account used to run the winshell wscript myscript.vbs command from the asp
???
Have you guys got any idea?
Yusuf(info@bias.net)
AT (Task Schedular) runs under the local system. AFAIK, the steps in workaround 3 in 324037 should work for scripts that are running from the task schedular.
As for IIS/ASP, open up the IIS manager and bring up the properties on the computer object. Go to directory security and then select edit under anonymous access. IIS is using this account.
Business Accounts
Answer for Membership
by: manikantanPosted on 2000-08-16 at 00:11:24ID: 3945014
Hi...
Can U Be Clear...
U need a mailing Component For a Standalone Vb application Or For A Server Side Vb App(ASP)
Tell Me..
Regards
Manikantan