Beispiel #1
0
     break;
     // Post the new generated message to the server. No need to break after
     // this becase we can print the thread after the mail got posted.
 // Post the new generated message to the server. No need to break after
 // this becase we can print the thread after the mail got posted.
 case 'post':
     // To post a new message to a newsgroup we need to know to which
     // group we should post it. So first we check if we know something
     // about the destination newsgroup...
     if (isset($_POST['newsgroup'])) {
         // Next thing we check if $message is set, which means that the new
         // message is a answer to an old message.
         if (isset($_POST['message'])) {
             // So we are answering a message. To fill the References Headers
             // we need to find out details of the original message...
             $msg = $nntp->getMessage($_POST['newsgroup'], $_POST['message']);
             // The field that is interesting is the id of the original message.
             $msgid = $msg->long_id;
         } else {
             // Ok, we are generating a new message, so there is no message id
             // of an old message and we set the id to 0.
             $msgid = 0;
         }
         // Next step is to find out who we are to generate the correct
         // from address...
         $sender = $_SESSION['GO_SESSION']["name"] . " <" . $_SESSION['GO_SESSION']["email"] . ">";
         // Now we have all information we need to post the new message. So
         // we can do it.
         // TODO add some checks if subject and body is valid.
         // TODO $retval should include the message id of the new message so
         // we can display the correct thread if we just started a new one.