problem with sending emails with CDO

Discussion in 'ASP General' started by Cas, Jul 19, 2004.

  1. Cas

    Cas Guest

    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 = ""
    .To = ""
    .Subject = "test with CDO"
    .TextBody = "it works"
    .Send
    End With
    Set cdoMessage = Nothing
    Set cdoConfig = Nothing
    %>
     
    Cas, Jul 19, 2004
    #1
    1. Advertising

  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
     
    Aaron [SQL Server MVP], Jul 19, 2004
    #2
    1. Advertising

  3. Cas

    Jeff Cochran Guest

    On Mon, 19 Jul 2004 10:42:54 +0200, "Cas" <> 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 = ""
    > .To = ""
    > .Subject = "test with CDO"
    > .TextBody = "it works"
    > .Send
    > End With
    > Set cdoMessage = Nothing
    > Set cdoConfig = Nothing
    >%>
    >
     
    Jeff Cochran, Jul 19, 2004
    #3
  4. Cas

    Ray at Guest

    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" <> wrote in message
    news:uDS%23$...
    > 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.
     
    Ray at, Jul 19, 2004
    #4
  5. Cas

    Cas Guest

    thanks

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

    >
    >
     
    Cas, Jul 19, 2004
    #5
  6. Cas

    Cas Guest

    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:...
    > 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" <> wrote in message
    > news:uDS%23$...
    > > 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.

    >
    >
     
    Cas, Jul 19, 2004
    #6
  7. Cas

    Ray at Guest

    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" <> wrote in message
    news:...
    > 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:...
    >> 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" <> wrote in message
    >> news:uDS%23$...
    >> > 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.

    >>
    >>

    >
    >
     
    Ray at, Jul 19, 2004
    #7
  8. 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" <> wrote in message
    news:...
    > Maybe one more point:
    > the first four lines are between comments, so how can they be interpreted

    by
    > ASP?
     
    Aaron [SQL Server MVP], Jul 19, 2004
    #8
  9. Cas

    Cas Guest

    Ok, thanks again


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

    interpreted
    > by
    > > ASP?

    >
    >
     
    Cas, Jul 19, 2004
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. jason
    Replies:
    2
    Views:
    209
    Adrienne
    Aug 20, 2003
  2. Rob Meade

    Windows 2003 Server / CDO Emails - ASP FAQ

    Rob Meade, Nov 19, 2003, in forum: ASP General
    Replies:
    6
    Views:
    206
    Rob Meade
    Nov 22, 2003
  3. Paul

    CDO.Message and emails bouncing back

    Paul, Feb 23, 2005, in forum: ASP General
    Replies:
    1
    Views:
    264
    Paxton
    Feb 25, 2005
  4. Replies:
    4
    Views:
    166
  5. Maxelcat

    Sending emails using CDo

    Maxelcat, Jun 8, 2006, in forum: ASP General
    Replies:
    2
    Views:
    133
    Maxelcat
    Jun 8, 2006
Loading...

Share This Page