Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- My problems with Net_NNTP
October 10, 2005, 6:38 am
rate this thread
though it looks correct to me, e.g.
news.php.net says "posting failed - invalid from"
news.ntlworld.com says "Posting Failed ("From" Header not in Internet
$nntp = new Net_NNTP_Client();
$subject = "Testpost";
$newsgroup = "alt.binaries.test";
$body = "test";
$from = "firstname.lastname@example.org";
$response = $nntp->post($subject, $newsgroup, $from, $body);
Re: My problems with Net_NNTP
You've got the parameters in the wrong order.
* Post an article to a number of newsgroups.
* (Among the aditional headers you might think of adding could be:
* "NNTP-Posting-Host: <ip-of-author>", which should contain the IP-address
* of the author of the post, so the message can be traced back to him.
* Or "Organization: <org>" which contain the name of the organization
* the post originates from)
* @param string $newsgroups The newsgroup to post to.
* @param string $subject The subject of the post.
* @param string $body The body of the post itself.
* @param string $from Name + email-adress of sender.
* @param optional string $aditional Aditional headers to send.
* @return mixed (string) server response on success or (object) pear_error
* @access public
function post($newsgroups, $subject, $body, $from, $aditional = null)
return $this->cmdPost($newsgroups, $subject, $body, $from, $aditional);
Andy Hassall :: email@example.com :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool