469,306 Members | 1,794 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,306 developers. It's quick & easy.

problem with sending emails with CDO

Cas
Hi,

I run IIS 5.0 on windows 2000 server sp4. This server is connected to the
ISP with adsl modem.
I put ASP code (found on internet) in order to send emails with CDO: (see
below)
When running that page, i get the error: "HTTP 500 - Internal server error
Internet Explorer"
No idea why.
I wonder whether the first 4 lines must be between comments.
Another point: do i need to install SMTP service of my IIS server, or (what
i think) can i use the SMTP service of my ISP?

Thanks
Cas
<!--
METADATA
TYPE="typelib"
UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
NAME="CDO for Windows 2000 Library"
-->
<%
Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "smtp_ of_ my_ ISP"
.Update
End With
Set cdoMessage = CreateObject("CDO.Message")
With cdoMessage
Set .Configuration = cdoConfig
.From = "fr****@eretr.be"
.To = "to***@dfghdfg.be"
.Subject = "test with CDO"
.TextBody = "it works"
.Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing
%>
Jul 19 '05 #1
8 3072
On Mon, 19 Jul 2004 10:42:54 +0200, "Cas" <fh***@rt.sp> wrote:
I run IIS 5.0 on windows 2000 server sp4. This server is connected to the
ISP with adsl modem.
I put ASP code (found on internet) in order to send emails with CDO: (see
below)
When running that page, i get the error: "HTTP 500 - Internal server error
Internet Explorer"
No idea why.
FAQ:

Why do I get a 500 Internal Server error for all ASP errors?
http://www.aspfaq.com/show.asp?id=2109
I wonder whether the first 4 lines must be between comments.
Another point: do i need to install SMTP service of my IIS server, or (what
i think) can i use the SMTP service of my ISP?
Provided you have access to send through it, you can use any SMTP
server with CDO. That's what cdoSMTPServer is used for.

Jeff
Thanks
Cas
<!--
METADATA
TYPE="typelib"
UUID="CD000000-8B95-11D1-82DB-00C04FB1625D"
NAME="CDO for Windows 2000 Library"
-->
<%
Set cdoConfig = CreateObject("CDO.Configuration")
With cdoConfig.Fields
.Item(cdoSendUsingMethod) = cdoSendUsingPort
.Item(cdoSMTPServer) = "smtp_ of_ my_ ISP"
.Update
End With
Set cdoMessage = CreateObject("CDO.Message")
With cdoMessage
Set .Configuration = cdoConfig
.From = "fr****@eretr.be"
.To = "to***@dfghdfg.be"
.Subject = "test with CDO"
.TextBody = "it works"
.Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing
%>


Jul 19 '05 #2
> When running that page, i get the error: "HTTP 500 - Internal server error
Internet Explorer"
No idea why.


Find out what the real error message is.
http://www.aspfaq.com/2109
Jul 19 '05 #3
You first need to find out what the real error is by turning off "friendly
error messages" in Internet Explorer.

http://www.aspfaq.com/show.asp?id=2109

Ray at work
"Cas" <fh***@rt.sp> wrote in message
news:uD****************@TK2MSFTNGP10.phx.gbl...
Hi,

I run IIS 5.0 on windows 2000 server sp4. This server is connected to the
ISP with adsl modem.
I put ASP code (found on internet) in order to send emails with CDO: (see
below)
When running that page, i get the error: "HTTP 500 - Internal server error
Internet Explorer"
No idea why.

Jul 19 '05 #4
Cas
thanks

"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
message news:e5**************@tk2msftngp13.phx.gbl...
You first need to find out what the real error is by turning off "friendly
error messages" in Internet Explorer.

http://www.aspfaq.com/show.asp?id=2109

Ray at work
"Cas" <fh***@rt.sp> wrote in message
news:uD****************@TK2MSFTNGP10.phx.gbl...
Hi,

I run IIS 5.0 on windows 2000 server sp4. This server is connected to the ISP with adsl modem.
I put ASP code (found on internet) in order to send emails with CDO: (see below)
When running that page, i get the error: "HTTP 500 - Internal server error Internet Explorer"
No idea why.


Jul 19 '05 #5
Cas
Maybe one more point:
the first four lines are between comments, so how can they be interpreted by
ASP?
Thanks
"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
message news:e5**************@tk2msftngp13.phx.gbl...
You first need to find out what the real error is by turning off "friendly
error messages" in Internet Explorer.

http://www.aspfaq.com/show.asp?id=2109

Ray at work
"Cas" <fh***@rt.sp> wrote in message
news:uD****************@TK2MSFTNGP10.phx.gbl...
Hi,

I run IIS 5.0 on windows 2000 server sp4. This server is connected to the ISP with adsl modem.
I put ASP code (found on internet) in order to send emails with CDO: (see below)
When running that page, i get the error: "HTTP 500 - Internal server error Internet Explorer"
No idea why.


Jul 19 '05 #6
It's kinda like an include, in a way, but it's "including" a COM type
library instead of a file. ASP looks for the <!-- METADATA "comment."

Ray at work

"Cas" <fh***@rt.sp> wrote in message
news:OZ**************@TK2MSFTNGP10.phx.gbl...
Maybe one more point:
the first four lines are between comments, so how can they be interpreted
by
ASP?
Thanks
"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
message news:e5**************@tk2msftngp13.phx.gbl...
You first need to find out what the real error is by turning off
"friendly
error messages" in Internet Explorer.

http://www.aspfaq.com/show.asp?id=2109

Ray at work
"Cas" <fh***@rt.sp> wrote in message
news:uD****************@TK2MSFTNGP10.phx.gbl...
> Hi,
>
> I run IIS 5.0 on windows 2000 server sp4. This server is connected to the > ISP with adsl modem.
> I put ASP code (found on internet) in order to send emails with CDO: (see > below)
> When running that page, i get the error: "HTTP 500 - Internal server error > Internet Explorer"
> No idea why.



Jul 19 '05 #7
It's a pre-processing directive, like #include or @language. This specific
directive tells ASP to load the CDO library so the code can use named
constants instead of their numeric equivalents. You can do a similar thing
for ado constants as an alternative to loading the quite hefty adovbs.inc.

--
http://www.aspfaq.com/
(Reverse address to reply.)


"Cas" <fh***@rt.sp> wrote in message
news:OZ**************@TK2MSFTNGP10.phx.gbl...
Maybe one more point:
the first four lines are between comments, so how can they be interpreted by ASP?

Jul 19 '05 #8
Cas
Ok, thanks again
"Aaron [SQL Server MVP]" <te*****@dnartreb.noraa> wrote in message
news:ua**************@TK2MSFTNGP11.phx.gbl...
It's a pre-processing directive, like #include or @language. This specific directive tells ASP to load the CDO library so the code can use named
constants instead of their numeric equivalents. You can do a similar thing for ado constants as an alternative to loading the quite hefty adovbs.inc.

--
http://www.aspfaq.com/
(Reverse address to reply.)


"Cas" <fh***@rt.sp> wrote in message
news:OZ**************@TK2MSFTNGP10.phx.gbl...
Maybe one more point:
the first four lines are between comments, so how can they be
interpreted by
ASP?


Jul 19 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by dan glenn | last post: by
8 posts views Thread by Fabio Papa | last post: by
2 posts views Thread by Mr. x | last post: by
5 posts views Thread by Pauravi | last post: by
2 posts views Thread by Mr. x | last post: by
4 posts views Thread by splicemix | last post: by
3 posts views Thread by Ant | last post: by
5 posts views Thread by Kun | last post: by
reply views Thread by manevski ognjen | last post: by
2 posts views Thread by samvb | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by harlem98 | last post: by
1 post views Thread by Geralt96 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.