note 10327 added to imap_mail
| From: | bandpay at hotmail dot com | Date: | Thu, 28 Dec 2000 11:01:01 +0000 |
| Subject: | note 10327 added to imap_mail | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-9150@lists.php.net to get a copy of this message | ||
If you need to send messages to a NNTP server, and you don't find the function, which is
sufficient for this job, then use this.
$stream = fsockopen($server,$port, &$errno, &$errstr);
fwrite($stream, "POST\r\n");
fwrite($stream, "Newsgoups "$newsgroup."\n");
$fwrite ($stream, " What ever you need to write\n");
.........
fwrite($stream, "The rest of what you like to write\n");
fclose($stream);
There are ofcourse not so straight, but if you know which parameters your message needs, you can do
it like this.
You can build up a message with imap_mail_compose ();
When you a complete message then U can write it to the server, and the server will take care of the
time, date, Massage-ID and so on, but you have to know the sturcture of the header which you make,
and if you like to write a multipart message, then you better get to know it in details.
In case that you know a better way, please inform me.
Good luck.
http://www.php.net/manual/function.imap-mail.php