"Egbert Nierop (MVP for IIS)" wrote in message
news:uR******** ******@TK2MSFTN GP12.phx.gbl...
: "Roland Hall" wrote in message
: news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
: > "Egbert Nierop (MVP for IIS)" wrote in message
: > news:eK******** ******@TK2MSFTN GP12.phx.gbl...
: > : "Roland Hall" wrote in message
: > : news:ef******** ******@TK2MSFTN GP12.phx.gbl...
: > : > Is it possible to send/receive nntp messages via CDOSYS without a
3rd
: > : party
: > : > news component? The NNTP links I have found appear to be related to
: MS
: > : > Exchange 2K.
: > : >
: > : > My goal is to write an ASP interface as a customized news reader.
: > :
: > : Yes!
: > : This is perfectly possible. Outlook Express, also uses -the same-
: > component.
: >
: > Hi Egbert...
: >
: > Can you shed some light on where I can find documentation on this? It
is
: my
: > understanding that Exchange would have to be on the same server and I
had
: > hoped this was not a requirement. I cannot find any definitive
: information
: > anywhere.
:
: That's not correct. As I said, CDO is installed on for instance XP, and I
: have -no- Exchange on my system. Outlook Express uses CDO to post and to
: read messages.
: But as soon as you install Exchange on a server, it will replace the
: original CDO and add additional functionailty, that you don't need to
: imitate 'outlook express'.
:
: About documentation, it's not fully documented but not impossible to find
: out. The typelibrary is very extended and if you get comfortable using
that
: API, you also easy can post and read from NNTP servers.
:
:
http://msdn.microsoft.com/library/de..._newsgroup.asp
:
: Private Sub POST_NEWS_MESSA GE()
: Dim Msg As New CDO.Message
: Dim Cfg As New CDO.Configurati on
:
:
Cfg.Fields("htt p://schemas.microso ft.com/cdo/configuration/postusing").Val ue
: = 2
:
Cfg.Fields("htt p://schemas.microso ft.com/cdo/configuration/nntpserver").Va lu
: e = "yournntpserver "
:
: Cfg.Fields.Upda te
: Set Msg.Configurati on = Cfg
:
: Msg.Subject = "Hello"
: Msg.From = "us***@yourdoma in.com"
: Msg.Newsgroups = "yournewsgr oup"
: Msg.Post
:
: End Sub
Egbert...
Thanks for responding but this appears to be VB, not VBScript to be used
with ASP. I made some modifications and I got it working but it still needs
some work and now I need to find out how to get the messages and display
them and then write my interface.
Here is what I have currently. I posted this message in the test area.
<%@ Language=VBScri pt %>
<%
Option Explicit
Response.Buffer = True
Const cdoPostUsingPor t = 2
Const cdoPostUsingMet hod =
"http://schemas.microso ft.com/cdo/configuration/postusing"
Const cdoNNTPServer =
"http://schemas.microso ft.com/cdo/configuration/nntpserver"
Const cdoNNTPServerPo rt =
"http://schemas.microso ft.com/cdo/configuration/nntpserverport"
Const cdoNNTPConnecti onTimeout =
"http://schemas.microso ft.com/cdo/configuration/nntpconnectiont imeout"
Const cdoNNTPAuthenti cate =
"http://schemas.microso ft.com/cdo/configuration/nntpauthenticat e"
Const cdoPostEmailAdd ress =
"http://schemas.microso ft.com/cdo/configuration/postemailaddres s"
Private Sub Post_News_Messa ge()
Dim Cfg, Fields, Msg
Set Cfg = Server.CreateOb ject("CDO.Confi guration")
Set Fields = Cfg.Fields
Set Msg = Server.CreateOb ject("CDO.Messa ge")
With Fields
.Item(cdoPostUs ingMethod) = cdoPostUsingPor t
.Item(cdoNNTPSe rver) = "msnews.microso ft.com"
.Item(cdoNNTPSe rverPort) = 119
.Item(cdoNNTPCo nnectionTimeout ) = 10
.Update
End With
With Msg
.Configuration = Cfg
.Newsgroups = "microsoft.test "
.From = "nobody@nowhere "
.Subject = "NNTP Test"
.TextBody = "NNTP Test Sent @ " & Now()
.Post
End With
Set Fields = Nothing
Set Msg = Nothing
Set Cfg = Nothing
End Sub
Post_News_Messa ge
%>
I posted another message after this, after I modified my .From and it went
to the same thread. Do you know if this is based on the subject?
--
Roland Hall
/* This information is distributed in the hope that it will be useful, but
without any warranty; without even the implied warranty of merchantability
or fitness for a particular purpose. */
Technet Script Center -
http://www.microsoft.com/technet/scriptcenter/
WSH 5.6 Documentation -
http://msdn.microsoft.com/downloads/list/webdev.asp
MSDN Library -
http://msdn.microsoft.com/library/default.asp