Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old July 19th, 2005, 02:17 PM
Cas
Guest
 
Posts: n/a
Default problem with sending emails with CDO

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 = "fromme@eretr.be"
.To = "toyou@dfghdfg.be"
.Subject = "test with CDO"
.TextBody = "it works"
.Send
End With
Set cdoMessage = Nothing
Set cdoConfig = Nothing
%>


  #2  
Old July 19th, 2005, 02:17 PM
Jeff Cochran
Guest
 
Posts: n/a
Default Re: problem with sending emails with CDO

On Mon, 19 Jul 2004 10:42:54 +0200, "Cas" <fhffh@rt.sp> wrote:
[color=blue]
>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.[/color]

FAQ:

Why do I get a 500 Internal Server error for all ASP errors?
http://www.aspfaq.com/show.asp?id=2109
[color=blue]
>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?[/color]

Provided you have access to send through it, you can use any SMTP
server with CDO. That's what cdoSMTPServer is used for.

Jeff
[color=blue]
>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 = "fromme@eretr.be"
> .To = "toyou@dfghdfg.be"
> .Subject = "test with CDO"
> .TextBody = "it works"
> .Send
> End With
> Set cdoMessage = Nothing
> Set cdoConfig = Nothing
>%>
>[/color]

  #3  
Old July 19th, 2005, 02:17 PM
Aaron [SQL Server MVP]
Guest
 
Posts: n/a
Default Re: problem with sending emails with CDO

> When running that page, i get the error: "HTTP 500 - Internal server error[color=blue]
> Internet Explorer"
> No idea why.[/color]

Find out what the real error message is.
http://www.aspfaq.com/2109


  #4  
Old July 19th, 2005, 02:17 PM
Ray at
Guest
 
Posts: n/a
Default Re: problem with sending emails with CDO

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" <fhffh@rt.sp> wrote in message
news:uDS%23$yWbEHA.2544@TK2MSFTNGP10.phx.gbl...[color=blue]
> 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.[/color]


  #5  
Old July 19th, 2005, 02:17 PM
Cas
Guest
 
Posts: n/a
Default Re: problem with sending emails with CDO

thanks

"Ray at <%=sLocation%> [MVP]" <myfirstname at lane34 dot com> wrote in
message news:e5IyYkZbEHA.3476@tk2msftngp13.phx.gbl...[color=blue]
> 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" <fhffh@rt.sp> wrote in message
> news:uDS%23$yWbEHA.2544@TK2MSFTNGP10.phx.gbl...[color=green]
> > Hi,
> >
> > I run IIS 5.0 on windows 2000 server sp4. This server is connected to[/color][/color]
the[color=blue][color=green]
> > ISP with adsl modem.
> > I put ASP code (found on internet) in order to send emails with CDO:[/color][/color]
(see[color=blue][color=green]
> > below)
> > When running that page, i get the error: "HTTP 500 - Internal server[/color][/color]
error[color=blue][color=green]
> > Internet Explorer"
> > No idea why.[/color]
>
>[/color]


  #6  
Old July 19th, 2005, 02:17 PM
Cas
Guest
 
Posts: n/a
Default Re: problem with sending emails with CDO

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:e5IyYkZbEHA.3476@tk2msftngp13.phx.gbl...[color=blue]
> 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" <fhffh@rt.sp> wrote in message
> news:uDS%23$yWbEHA.2544@TK2MSFTNGP10.phx.gbl...[color=green]
> > Hi,
> >
> > I run IIS 5.0 on windows 2000 server sp4. This server is connected to[/color][/color]
the[color=blue][color=green]
> > ISP with adsl modem.
> > I put ASP code (found on internet) in order to send emails with CDO:[/color][/color]
(see[color=blue][color=green]
> > below)
> > When running that page, i get the error: "HTTP 500 - Internal server[/color][/color]
error[color=blue][color=green]
> > Internet Explorer"
> > No idea why.[/color]
>
>[/color]


  #7  
Old July 19th, 2005, 02:17 PM
Ray at
Guest
 
Posts: n/a
Default Re: problem with sending emails with CDO

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" <fhffh@rt.sp> wrote in message
news:OZaOZ5ZbEHA.4092@TK2MSFTNGP10.phx.gbl...[color=blue]
> 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:e5IyYkZbEHA.3476@tk2msftngp13.phx.gbl...[color=green]
>> 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" <fhffh@rt.sp> wrote in message
>> news:uDS%23$yWbEHA.2544@TK2MSFTNGP10.phx.gbl...[color=darkred]
>> > Hi,
>> >
>> > I run IIS 5.0 on windows 2000 server sp4. This server is connected to[/color][/color]
> the[color=green][color=darkred]
>> > ISP with adsl modem.
>> > I put ASP code (found on internet) in order to send emails with CDO:[/color][/color]
> (see[color=green][color=darkred]
>> > below)
>> > When running that page, i get the error: "HTTP 500 - Internal server[/color][/color]
> error[color=green][color=darkred]
>> > Internet Explorer"
>> > No idea why.[/color]
>>
>>[/color]
>
>[/color]


  #8  
Old July 19th, 2005, 02:17 PM
Aaron [SQL Server MVP]
Guest
 
Posts: n/a
Default Re: problem with sending emails with CDO

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" <fhffh@rt.sp> wrote in message
news:OZaOZ5ZbEHA.4092@TK2MSFTNGP10.phx.gbl...[color=blue]
> Maybe one more point:
> the first four lines are between comments, so how can they be interpreted[/color]
by[color=blue]
> ASP?[/color]


  #9  
Old July 19th, 2005, 02:17 PM
Cas
Guest
 
Posts: n/a
Default Re: problem with sending emails with CDO

Ok, thanks again


"Aaron [SQL Server MVP]" <ten.xoc@dnartreb.noraa> wrote in message
news:ua7c3DabEHA.4032@TK2MSFTNGP11.phx.gbl...[color=blue]
> It's a pre-processing directive, like #include or @language. This[/color]
specific[color=blue]
> 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[/color]
thing[color=blue]
> for ado constants as an alternative to loading the quite hefty adovbs.inc.
>
> --
> http://www.aspfaq.com/
> (Reverse address to reply.)
>
>
>
>
> "Cas" <fhffh@rt.sp> wrote in message
> news:OZaOZ5ZbEHA.4092@TK2MSFTNGP10.phx.gbl...[color=green]
> > Maybe one more point:
> > the first four lines are between comments, so how can they be[/color][/color]
interpreted[color=blue]
> by[color=green]
> > ASP?[/color]
>
>[/color]


 

Bookmarks

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 Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles