javascript and asp email
am 13.02.2007 11:22:00 von rvj
Im attempting to convert a simple CDO VB script to Javascript but keep
getting Internal Error 500. The VB version works fine.
As far as I can tell all I need to do change the object definition and add
the language declaration.
Can anyone see what is wrong with the object definition?
<%@ language=javascript %>
<%
objMail = Server.CreateObject("CDO.Message")
// objMail = New Server.CreateObject("CDO.Message")
objMail.From="x.y.z"
objMail.To="someone@somewhere.net"
objMail.Subject="topic"
objMail.TextBody="text"
objMail.Send
%>
Re: javascript and asp email
am 13.02.2007 11:56:20 von Anthony Jones
"rvj" wrote in message
news:%23rKlNj1THHA.4668@TK2MSFTNGP04.phx.gbl...
>
> Im attempting to convert a simple CDO VB script to Javascript but keep
> getting Internal Error 500. The VB version works fine.
>
> As far as I can tell all I need to do change the object definition and add
> the language declaration.
>
> Can anyone see what is wrong with the object definition?
>
>
> <%@ language=javascript %>
> <%
>
> objMail = Server.CreateObject("CDO.Message")
> // objMail = New Server.CreateObject("CDO.Message")
>
> objMail.From="x.y.z"
> objMail.To="someone@somewhere.net"
> objMail.Subject="topic"
> objMail.TextBody="text"
> objMail.Send
>
> %>
>
Is it a 500 or a 500.100?
If 500.100 what is the error text supplied with the error.
You have 'Send detailed error messages' enabled on the App Debugging tab of
the Application Configuration dialog? You can open this dialog from
application properties home directory tab.
You tested the original VBScript version on the same server before porting
to Javascript and it worked?
use:-
Language = JScript
no javascript
You have configured the mail settings on the server extensions tab of the
application properties dialog?
Re: javascript and asp email
am 13.02.2007 13:35:51 von rvj
thanks for your response (s)
> Is it a 500 or a 500.100?
HTTP 500 Internal server error appears on the IE title bar - the content
displays the message "the page cannot be displayed"
> You have 'Send detailed error messages' enabled on the App Debugging tab
> of
> the Application Configuration dialog?
I presume the dialog is an asp server facility? - I'm using a n ASP
hosting service so I'll try and find out
> You tested the original VBScript version on the same server before porting
> to Javascript and it worked?
yes - on the same server in the same directory vbmail.asp and jsmail.asp
> Language = JScript
ok will try this next
> You have configured the mail settings on the server extensions tab of the
> application properties dialog?
again I assume this is hosting service issue
"Anthony Jones" wrote in message
news:%23AV2Z21THHA.4028@TK2MSFTNGP03.phx.gbl...
>
> "rvj" wrote in message
> news:%23rKlNj1THHA.4668@TK2MSFTNGP04.phx.gbl...
>>
>> Im attempting to convert a simple CDO VB script to Javascript but keep
>> getting Internal Error 500. The VB version works fine.
>>
>> As far as I can tell all I need to do change the object definition and
>> add
>> the language declaration.
>>
>> Can anyone see what is wrong with the object definition?
>>
>>
>> <%@ language=javascript %>
>> <%
>>
>> objMail = Server.CreateObject("CDO.Message")
>> // objMail = New Server.CreateObject("CDO.Message")
>>
>> objMail.From="x.y.z"
>> objMail.To="someone@somewhere.net"
>> objMail.Subject="topic"
>> objMail.TextBody="text"
>> objMail.Send
>>
>> %>
>>
>
> Is it a 500 or a 500.100?
>
> If 500.100 what is the error text supplied with the error.
>
> You have 'Send detailed error messages' enabled on the App Debugging tab
> of
> the Application Configuration dialog? You can open this dialog from
> application properties home directory tab.
>
> You tested the original VBScript version on the same server before porting
> to Javascript and it worked?
>
> use:-
>
> Language = JScript
>
> no javascript
>
> You have configured the mail settings on the server extensions tab of the
> application properties dialog?
>
>
>
Re: javascript and asp email
am 13.02.2007 14:27:38 von rvj
PS I tried using JScript instead of javscript without success
Does anyone one know if there is a case issue with the object properties?
.... or can anyone simply confirm that this should work !!!!
(reading some of the JSCRIPT examples on the MSDN website I m coming across
a number of asp examples where it specifically excludes JScript )
"rvj" wrote in message
news:%23kvLDu2THHA.5108@TK2MSFTNGP06.phx.gbl...
> thanks for your response (s)
>
>> Is it a 500 or a 500.100?
>
> HTTP 500 Internal server error appears on the IE title bar - the content
> displays the message "the page cannot be displayed"
>
>> You have 'Send detailed error messages' enabled on the App Debugging tab
>> of
>> the Application Configuration dialog?
>
> I presume the dialog is an asp server facility? - I'm using a n ASP
> hosting service so I'll try and find out
>
>> You tested the original VBScript version on the same server before
>> porting
>> to Javascript and it worked?
>
> yes - on the same server in the same directory vbmail.asp and jsmail.asp
>
>> Language = JScript
>
> ok will try this next
>
>
>> You have configured the mail settings on the server extensions tab of the
>> application properties dialog?
>
> again I assume this is hosting service issue
>
> "Anthony Jones" wrote in message
> news:%23AV2Z21THHA.4028@TK2MSFTNGP03.phx.gbl...
>>
>> "rvj" wrote in message
>> news:%23rKlNj1THHA.4668@TK2MSFTNGP04.phx.gbl...
>>>
>>> Im attempting to convert a simple CDO VB script to Javascript but keep
>>> getting Internal Error 500. The VB version works fine.
>>>
>>> As far as I can tell all I need to do change the object definition and
>>> add
>>> the language declaration.
>>>
>>> Can anyone see what is wrong with the object definition?
>>>
>>>
>>> <%@ language=javascript %>
>>> <%
>>>
>>> objMail = Server.CreateObject("CDO.Message")
>>> // objMail = New Server.CreateObject("CDO.Message")
>>>
>>> objMail.From="x.y.z"
>>> objMail.To="someone@somewhere.net"
>>> objMail.Subject="topic"
>>> objMail.TextBody="text"
>>> objMail.Send
>>>
>>> %>
>>>
>>
>> Is it a 500 or a 500.100?
>>
>> If 500.100 what is the error text supplied with the error.
>>
>> You have 'Send detailed error messages' enabled on the App Debugging tab
>> of
>> the Application Configuration dialog? You can open this dialog from
>> application properties home directory tab.
>>
>> You tested the original VBScript version on the same server before
>> porting
>> to Javascript and it worked?
>>
>> use:-
>>
>> Language = JScript
>>
>> no javascript
>>
>> You have configured the mail settings on the server extensions tab of the
>> application properties dialog?
>>
>>
>>
>
>
Re: javascript and asp email
am 13.02.2007 15:15:30 von Anthony Jones
"rvj" wrote in message
news:%23kvLDu2THHA.5108@TK2MSFTNGP06.phx.gbl...
> thanks for your response (s)
>
> > Is it a 500 or a 500.100?
>
> HTTP 500 Internal server error appears on the IE title bar - the content
> displays the message "the page cannot be displayed"
>
> > You have 'Send detailed error messages' enabled on the App Debugging tab
> > of
> > the Application Configuration dialog?
>
Do you have a windows XP Pro with IIS installed you could (and should) test
your code there before uploading to the host.
> I presume the dialog is an asp server facility? - I'm using a n ASP
> hosting service so I'll try and find out
>
> > You tested the original VBScript version on the same server before
porting
> > to Javascript and it worked?
>
> yes - on the same server in the same directory vbmail.asp and jsmail.asp
>
Ok so that's odd. There is nothing wrong with your code as it is if the
VBScript version of it is working. Have you confirmed that JScript itself
is ok on the host.
Something like:-
<%@ Language=JScript%>
<%
var s = 'Hello World'
response.write(s)
%>
> > Language = JScript
>
> ok will try this next
>
>
> > You have configured the mail settings on the server extensions tab of
the
> > application properties dialog?
>
> again I assume this is hosting service issue
>
Yes if the host is allowing you to send mail from their server they should
have configured these settings.
Re: javascript and asp email
am 13.02.2007 15:18:27 von Anthony Jones
"rvj" wrote in message
news:u2Kk%23K3THHA.4028@TK2MSFTNGP03.phx.gbl...
> PS I tried using JScript instead of javscript without success
>
> Does anyone one know if there is a case issue with the object properties?
>
The object in question is an ordinary COM object (CDO.Message). It is not
case sensitive. That said your casing looks fine even if it were.
> ... or can anyone simply confirm that this should work !!!!
>
> (reading some of the JSCRIPT examples on the MSDN website I m coming
across
> a number of asp examples where it specifically excludes JScript )
>
> "rvj" wrote in message
> news:%23kvLDu2THHA.5108@TK2MSFTNGP06.phx.gbl...
> > thanks for your response (s)
> >
> >> Is it a 500 or a 500.100?
> >
> > HTTP 500 Internal server error appears on the IE title bar - the content
> > displays the message "the page cannot be displayed"
> >
> >> You have 'Send detailed error messages' enabled on the App Debugging
tab
> >> of
> >> the Application Configuration dialog?
> >
> > I presume the dialog is an asp server facility? - I'm using a n ASP
> > hosting service so I'll try and find out
> >
> >> You tested the original VBScript version on the same server before
> >> porting
> >> to Javascript and it worked?
> >
> > yes - on the same server in the same directory vbmail.asp and jsmail.asp
> >
> >> Language = JScript
> >
> > ok will try this next
> >
> >
> >> You have configured the mail settings on the server extensions tab of
the
> >> application properties dialog?
> >
> > again I assume this is hosting service issue
> >
> > "Anthony Jones" wrote in message
> > news:%23AV2Z21THHA.4028@TK2MSFTNGP03.phx.gbl...
> >>
> >> "rvj" wrote in message
> >> news:%23rKlNj1THHA.4668@TK2MSFTNGP04.phx.gbl...
> >>>
> >>> Im attempting to convert a simple CDO VB script to Javascript but keep
> >>> getting Internal Error 500. The VB version works fine.
> >>>
> >>> As far as I can tell all I need to do change the object definition and
> >>> add
> >>> the language declaration.
> >>>
> >>> Can anyone see what is wrong with the object definition?
> >>>
> >>>
> >>> <%@ language=javascript %>
> >>> <%
> >>>
> >>> objMail = Server.CreateObject("CDO.Message")
> >>> // objMail = New Server.CreateObject("CDO.Message")
> >>>
> >>> objMail.From="x.y.z"
> >>> objMail.To="someone@somewhere.net"
> >>> objMail.Subject="topic"
> >>> objMail.TextBody="text"
> >>> objMail.Send
> >>>
> >>> %>
> >>>
> >>
> >> Is it a 500 or a 500.100?
> >>
> >> If 500.100 what is the error text supplied with the error.
> >>
> >> You have 'Send detailed error messages' enabled on the App Debugging
tab
> >> of
> >> the Application Configuration dialog? You can open this dialog from
> >> application properties home directory tab.
> >>
> >> You tested the original VBScript version on the same server before
> >> porting
> >> to Javascript and it worked?
> >>
> >> use:-
> >>
> >> Language = JScript
> >>
> >> no javascript
> >>
> >> You have configured the mail settings on the server extensions tab of
the
> >> application properties dialog?
> >>
> >>
> >>
> >
> >
>
>
Re: javascript and asp email
am 15.02.2007 13:04:35 von rvj
OK FYI
objMail.send()
Many thanks
"Anthony Jones" wrote in message
news:OK$Lsl3THHA.2212@TK2MSFTNGP02.phx.gbl...
>
> "rvj" wrote in message
> news:%23kvLDu2THHA.5108@TK2MSFTNGP06.phx.gbl...
>> thanks for your response (s)
>>
>> > Is it a 500 or a 500.100?
>>
>> HTTP 500 Internal server error appears on the IE title bar - the content
>> displays the message "the page cannot be displayed"
>>
>> > You have 'Send detailed error messages' enabled on the App Debugging
>> > tab
>> > of
>> > the Application Configuration dialog?
>>
>
> Do you have a windows XP Pro with IIS installed you could (and should)
> test
> your code there before uploading to the host.
>
>> I presume the dialog is an asp server facility? - I'm using a n ASP
>> hosting service so I'll try and find out
>>
>> > You tested the original VBScript version on the same server before
> porting
>> > to Javascript and it worked?
>>
>> yes - on the same server in the same directory vbmail.asp and jsmail.asp
>>
>
> Ok so that's odd. There is nothing wrong with your code as it is if the
> VBScript version of it is working. Have you confirmed that JScript itself
> is ok on the host.
>
> Something like:-
>
> <%@ Language=JScript%>
> <%
>
> var s = 'Hello World'
>
> response.write(s)
>
> %>
>
>
>
>> > Language = JScript
>>
>> ok will try this next
>>
>>
>> > You have configured the mail settings on the server extensions tab of
> the
>> > application properties dialog?
>>
>> again I assume this is hosting service issue
>>
>
> Yes if the host is allowing you to send mail from their server they should
> have configured these settings.
>
>
>
Re: javascript and asp email
am 15.02.2007 13:15:46 von Anthony Jones
"rvj" wrote in message
news:utGX5lPUHHA.1200@TK2MSFTNGP02.phx.gbl...
>
> OK FYI
>
> objMail.send()
>
Ooh that's embarrasing. It's very difficult thinking in JScript when
looking at ASP code. :$
Re: javascript and asp email
am 15.02.2007 13:31:30 von exjxw.hannivoort
Anthony Jones wrote on 15 feb 2007 in
microsoft.public.inetserver.asp.general:
>
> "rvj" wrote in message
> news:utGX5lPUHHA.1200@TK2MSFTNGP02.phx.gbl...
>>
>> OK FYI
>>
>> objMail.send()
>>
>
> Ooh that's embarrasing. It's very difficult thinking in JScript when
> looking at ASP code. :$
There is NO ASP code, ASP being a platform for serverside vbs, js, etc.
js is just as valuable under asp as vbs, and sometimes far simpler, as with
regex, or even the only choice, as with dateObj.getTimezoneOffset()
Getting the best of both by mixing the serverside code is simple.
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)