Posting with php ... timeout

Russ Allbery rra at
Tue Jul 25 17:59:26 UTC 2000

OlivierS <teardrop at> writes:

> Does anyone know how i could easily post a message using php ? ... i
> dont want to use imap_mail cause it is very hard to install ...  I am
> trying with fsockopen but i have a problem : there is a timeout during
> the post ...  Does anyone can explain me what is really a timeout here
> ?! php should be enough quick to post the message ?!

> $connection = fsockopen("my_serv",119, &$error_number,
> &$error_description);
> socket_set_timeout(200000);
> fputs($connection,"mode reader\n");
> fputs($connection,"group\n");

You're trying to stream commands after a mode reader; because of INN's
internal architecture, this doesn't work.  You need to wait for a server
response after issuing mode reader, and then continue to post.

You don't need to send a group command to post; you can just issue the
post command right away.

Oh, and all lines, including each line of the message, should end in CRLF,
not just LF.

Russ Allbery (rra at             <>

More information about the inn-workers mailing list