473,386 Members | 1,679 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

javascript and asp email

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="so*****@somewhere.net"
objMail.Subject="topic"
objMail.TextBody="text"
objMail.Send

%>
Feb 13 '07 #1
8 3313

"rvj" <rv*@rolemodels.netwrote in message
news:%2****************@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="so*****@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?

Feb 13 '07 #2
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" <An*@yadayadayada.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>
"rvj" <rv*@rolemodels.netwrote in message
news:%2****************@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="so*****@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?

Feb 13 '07 #3
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" <rv*@rolemodels.netwrote in message
news:%2****************@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" <An*@yadayadayada.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>>
"rvj" <rv*@rolemodels.netwrote in message
news:%2****************@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="so*****@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?


Feb 13 '07 #4

"rvj" <rv*@rolemodels.netwrote in message
news:%2****************@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.

Feb 13 '07 #5

"rvj" <rv*@rolemodels.netwrote in message
news:u2****************@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" <rv*@rolemodels.netwrote in message
news:%2****************@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" <An*@yadayadayada.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
>
"rvj" <rv*@rolemodels.netwrote in message
news:%2****************@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="so*****@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?


Feb 13 '07 #6
rvj

OK FYI

objMail.send()

Many thanks
"Anthony Jones" <An*@yadayadayada.comwrote in message
news:OK**************@TK2MSFTNGP02.phx.gbl...
>
"rvj" <rv*@rolemodels.netwrote in message
news:%2****************@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.

Feb 15 '07 #7

"rvj" <rv*@rolemodels.netwrote in message
news:ut**************@TK2MSFTNGP02.phx.gbl...
>
OK FYI

objMail.send()
Ooh that's embarrasing. It's very difficult thinking in JScript when
looking at ASP code. :$

Feb 15 '07 #8
Anthony Jones wrote on 15 feb 2007 in
microsoft.public.inetserver.asp.general:
>
"rvj" <rv*@rolemodels.netwrote in message
news:ut**************@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)
Feb 15 '07 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.