pb: Der Formmailer

<?php
  $fmtResponse= implode("", file("feddich.html"));
  $fmtMail= implode("", file("mail.htt"));
  foreach($HTTP_POST_VARS as $key=> $val) {
    $fmtResponse= str_replace("<$key>", $val, $fmtResponse);
    $fmtMail= str_replace("<$key>", $val, $fmtMail);
  }
  if ($HTTP_POST_VARS["access"] == "irregeheim") {
    mail($HTTP_POST_VARS["empfänger1"], $HTTP_POST_VARS["subject"], $fmtMail);
    mail($HTTP_POST_VARS["empfänger2"], $HTTP_POST_VARS["subject2"], $fmtMail);
  }
  echo $fmtResponse;
?>

Was baue ich ein um nicht den "CGI-Mailer" als Absender zu bekommen sondern meine Wunsch Variable?

Gruß,
pb

  1. Hallo pb,

    mail($HTTP_POST_VARS["empfänger2"], $HTTP_POST_VARS["subject2"], $fmtMail);

    du musst noch einen 4.Parameter hinzufügen, der etwa so aussieht:
    From: irgendwas@irgendwo.xy
    siehe http://www.php.net/manual/de/function.mail.php

    Was baue ich ein um nicht den "CGI-Mailer" als Absender zu bekommen sondern meine Wunsch Variable?

    das gleiche Problem wird auch in [pref:t=33096&m=180012] behandelt.

    Grüße aus Nürnberg
    Tobias