Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > Same ASP page executed 2 ways produce different results...strange

Thread Tools

Same ASP page executed 2 ways produce different results...strange

Posts: n/a
Hi everyone,

I was looking for a way to execute an .ASP page through the windows
scehduler, and I found several posts that showed out to "run" a URL
using a windows scripting file. The file looks like this:

set x=createobject("microsoft.xmlhttp")
x.Open "GET", "", False
msgbox("Verastar East Ending - " & x.responseText)
set x=nothing

I successfully scheduled this script in Windows and it runs on time and
does what the .asp page should - with one exception - it does not send
the notifcation email out.

If I open up a browser and type in that exact URL, the page works fine
and it sends the email as designed.

When it runs through the above script in the scheduler, all the
database updates are performed properly, but the emails aren't sent.
How can this be?

Im assuming that in both instances, the page is being invoked under the
security context of the anonymous IUSR_MachineName account, but maybe
this is not the case?

Anyone else have any thoughts on what might be happening here?

Here is the code in the .asp page that sends the emails:

'Now create and send results email
Set Mailer = Server.CreateObject("SMTPsvg.Mailer")
Mailer.FromName = "Admin"
Mailer.FromAddress= "(E-Mail Removed)"
Mailer.RemoteHost = ""
Mailer.AddRecipient "Customer", "(E-Mail Removed)"
Mailer.Subject = auct("Name") & " Ending Results.."
Mailer.BodyText = mbody
Mailer.ContentType = "text/html"
if Mailer.SendMail then
Response.Write "Form information submitted..."
Response.Write "Mail send failure. Error was " & Mailer.Response
end if
set Mailer = Nothing

As a final note, the resulting message after the scheduled job is
executed, is "Form Information submitted...", which indicates that the
Mailer.SendMail conditional above was successful (no errors).

Any help would be greatly appreciated.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Why the same script have different behavior when executed in Normalor Debug mode? Perl Misc 2 03-03-2009 10:10 PM
running same script on same data on two different machines -->different result Christopher Brewster Python 5 11-14-2008 08:19 PM
Win32::OLE different connections methods produce different results HmJ Perl Misc 0 03-28-2008 02:46 PM
Ways to capture output stream of the process executed with exec call ? Googy Ruby 1 01-26-2007 08:55 AM
can java produce .exe? if it can produce jar,how do you do? Java 5 10-27-2006 02:07 AM