hello everybody,
please help me with the following problem.

Warning: Server Error in D:\Pages\Koyopage\global\sendmail.php on line 70

Warning: Cannot add header information - headers already sent by (output started at D:\Pages\Koyopage\global\sendmail.php:70) in D:\Pages\Koyopage\global\sendmail.php on line 164

i cant find the error...

here ist the sendmailscript...
http://www.zoozoozoo.de/koyo/sendmail.txt

and on some servers this script is working fine, but this time
it doesnt work...

thanks a lot

    to use header(), you may not print anything on the website before the function.

      The second warning is consequent to first: first message is printed, so the output is started, so you can't add headers from now on.

      What is the first problem, i can't say by now. Warning about 'SERVER ERROR' seems strange, never seen anything alike.

      Try to put some changes to PARSE function, maybe you'll get a key to the problem.

        on some servers this scripts does work....
        is there a definitive error in it ?

          could this error be caused by a badly configurated server?

            If it works somewhere, then the problem is with server.
            Either it's bad configured, or php version not "good enough" for the script, or smth.

            But as for me, i can't see anything strange in the code.

            The error message point to a line with curly brace, it usually means unpaired opening or closing brace or quote or smth. But in such a case you usually get PARSE ERROR warning, not a SERVER ERROR...

              there are some not-so-good points in the code, for example, $content is not assigned an initial value, or count($reserved_keys) is re-evaluated on every iteration, but no evident errors.
              Or maybe I'm blind 🙂

                Can you really send mail from the server?
                I'm no guru in config, but sendmail_path = no_value seems suspitious for me.

                  as an admin where could i change the path ?
                  thanx a lot

                    open and edit the file
                    C:\WINNT\php.ini

                      Somewhere in php.ini

                      But i'm not sure it will help. I have almost no expierence with configuring, and I have no idea what is the problem with your script. It may be easily it has nothing to do with sendmail_path. I'm nearly sure it hasn't 🙂

                        tahnks to everybody - now its working....didnt work because of a badly configured windows-server....the mailserver wasnt spezified...

                          if my form submitts a variable called "empfaenger" and i want that this variable should be the person which retrives the email, how could i realize this ? at this time the mail is always send to $recpient = 'webmaster@koyo.de' ....

                            let send-to address be
                            $empfaenger.'@koyo.de'
                            or
                            $empfaenger
                            if it's complete address.

                            Or, not to get critisized by all 'don't-forget-register_globals_OFF' people 🙂,
                            $_GET['empfaenger'] instead of $empfaenger.

                            Is here any problem?

                            Or did i misunderstood the question?..

                              so does this mean :

                              $recipient = $_GET['empfaenger'];
                              $require ='empfaenger,name,e_mail,message';
                              $subject ='Mail von Homepage';
                              $redirect ='mail_bestaetigung.html';

                                Yes. If empfaenger is a full mail address, then it should work as needed.

                                  does this mean

                                  $recipient = $_GET['empfaenger'];
                                  $require ='empfaenger,name,e_mail,message';
                                  $subject ='Mail von Homepage';
                                  $redirect ='mail_bestaetigung.html';
                                  $fehler ='';
                                  $report =true;

                                  this is the form on a html-page...

                                  <form name="kontakformular" method="post" action="/global/sendmail.php">
                                  <select id=f1 name="empfaenger">

                                              <option value="rhode@koyo.de">Frau Karin Rhode</option>
                                              <option value="gerhard@koyo.de">Herr Gerhard D&uuml;hrkopp</option>
                                              <option value="georg@koyo.de">Herr Georg L&uuml;ckert</option>

                                  ..
                                  ..
                                  </form>

                                  and so on...

                                    Yeah.
                                    Or, at least, you may try it 🙂