Posting a Message to an NNTP Newsgroup
Topic Last Modified: 2006-06-11
Example
Visual Basic
Private Sub POST_NEWS_MESSAGE()
Dim Msg As New CDO.Message
Dim Cfg As New CDO.Configuration
Cfg.Fields("https://schemas.microsoft.com/cdo/configuration/postusing").Value = 2
Cfg.Fields("https://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
Note
You must set the Subject, From, and Newsgroups properties for a Message object, or the Post method generates an error.