Reply to Re: My problems with Net_NNTP

Your name:

Reply:


Posted by Andy Hassall on 10/10/05 15:00

On 9 Oct 2005 23:38:28 -0700, sff11i@gmail.com wrote:

>I always get error messages regarding the "from" address field even
>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
>Syntax.)"
>
>$response = $nntp->post($subject, $newsgroup, $from, $body);

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
on failure
* @access public
*/
function post($newsgroups, $subject, $body, $from, $aditional = null)
{
return $this->cmdPost($newsgroups, $subject, $body, $from, $aditional);
}

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация