Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > problem with sending emails with CDO

Reply
Thread Tools

problem with sending emails with CDO

 
 
Cas
Guest
Posts: n/a
 
      07-19-2004
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 = "(E-Mail Removed)"
.To = "(E-Mail Removed)"
.Subject = "test with CDO"
.TextBody = "it works"
.Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing
%>


 
Reply With Quote
 
 
 
 
Aaron [SQL Server MVP]
Guest
Posts: n/a
 
      07-19-2004
> 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


 
Reply With Quote
 
 
 
 
Jeff Cochran
Guest
Posts: n/a
 
      07-19-2004
On Mon, 19 Jul 2004 10:42:54 +0200, "Cas" <(E-Mail Removed)> 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 = "(E-Mail Removed)"
> .To = "(E-Mail Removed)"
> .Subject = "test with CDO"
> .TextBody = "it works"
> .Send
> End With
> Set cdoMessage = Nothing
> Set cdoConfig = Nothing
>%>
>


 
Reply With Quote
 
Ray at
Guest
Posts: n/a
 
      07-19-2004
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" <(E-Mail Removed)> wrote in message
news:uDS%23$(E-Mail Removed)...
> 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.



 
Reply With Quote
 
Cas
Guest
Posts: n/a
 
      07-19-2004
thanks

"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
message news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:uDS%23$(E-Mail Removed)...
> > 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.

>
>



 
Reply With Quote
 
Cas
Guest
Posts: n/a
 
      07-19-2004
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:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:uDS%23$(E-Mail Removed)...
> > 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.

>
>



 
Reply With Quote
 
Ray at
Guest
Posts: n/a
 
      07-19-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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:(E-Mail Removed)...
>> 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" <(E-Mail Removed)> wrote in message
>> news:uDS%23$(E-Mail Removed)...
>> > 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.

>>
>>

>
>



 
Reply With Quote
 
Aaron [SQL Server MVP]
Guest
Posts: n/a
 
      07-19-2004
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Maybe one more point:
> the first four lines are between comments, so how can they be interpreted

by
> ASP?



 
Reply With Quote
 
Cas
Guest
Posts: n/a
 
      07-19-2004
Ok, thanks again


"Aaron [SQL Server MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Maybe one more point:
> > the first four lines are between comments, so how can they be

interpreted
> by
> > ASP?

>
>



 
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
what is ("http://schemas.microsoft.com/cdo/configuration/sendusing") doing in CDO uofs76@yahoo.com ASP General 0 02-07-2007 01:09 PM
Problem With CDO in sending formatted text mail k.visube@gmail.com ASP General 4 06-16-2006 06:11 AM
Sending emails using CDo Maxelcat ASP General 2 06-08-2006 06:49 PM
Trouble in sending emails using CDO aroraamit81@gmail.com ASP General 4 05-22-2006 08:35 PM
CDO for Windows 2000 vs CDO for Exchange 2000 ASP .Net 2 07-11-2003 12:31 PM



Advertisments