Velocity Reviews - Computer Hardware Reviews

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

Reply
Thread Tools

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

 
 
Benman
Guest
Posts: n/a
 
      12-09-2005
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:

test1.vbs
-------------
set x=createobject("microsoft.xmlhttp")
x.Open "GET", "http://www.mydomain.com/schedEnding.asp?aid=4", False
x.Send
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 = "mail.mydomain.com"
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..."
else
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
 
 
 
Reply

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? djslls@sina.com 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? aungkopyay@gmail.com Java 5 10-27-2006 02:07 AM



Advertisments