This documentation is archived and is not being maintained.

Posting a Message to an NNTP Newsgroup

EWS Managed API

Topic Last Modified: 2006-06-11

Visual Basic


Private Sub POST_NEWS_MESSAGE()
Dim Msg As New CDO.Message
Dim Cfg As New CDO.Configuration

Cfg.Fields("http://schemas.microsoft.com/cdo/configuration/postusing").Value = 2
Cfg.Fields("http://schemas.microsoft.com/cdo/configuration/nntpserver").Value = "yournntpserver"

Cfg.Fields.Update
Set Msg.Configuration = Cfg
 
Msg.Subject = "Hello"
Msg.From = "user1@yourdomain.com"
Msg.Newsgroups = "yournewsgroup"
Msg.Post

End Sub
Aa563396.note(en-us,EXCHG.80).gifNote:
You must set the Subject, From, and Newsgroups properties for a Message object, or the Post method generates an error.
Show: