Page 1 of 1

Fatal error: Call to undefined function: mail()

Posted: 2004-12-07 12:57
by mikrokosmos
habe bei 1&1 root server xl mit plesk - nachdem ich meine seite wieder darauf eigerichtet habe bekomme ich folgenden fehelr wenn ich ein formular per formmail.php versenden will. Fatal error: Call to undefined function: mail()


hier ein teil aus dem formmailscript sieht so aus:



Code: Select all

// mail the content we figure out in the following steps
function mail_it($content, $subject, $email, $recipient) {
   global $attachment_chunk, $attachment_name, $attachment_type, $attachment_sent, $bcc;

   $ob = "----=_OuterBoundary_000";
   $ib = "----=_InnerBoundery_001";
   
   $headers  = "MIME-Version: 1.0rn"; 
   $headers .= "From: ".$email."n"; 
   $headers .= "To: ".$recipient."n"; 
   $headers .= "Reply-To: ".$email."n";
   if ($bcc) $headers .= "Bcc: ".$bcc."n"; 
   $headers .= "X-Priority: 1n"; 
   $headers .= "X-Mailer: DT Formmail".VERSION."n"; 
   $headers .= "Content-Type: multipart/mixed;ntboundary="".$ob.""n";
   
          
   $message  = "This is a multi-part message in MIME format.n";
   $message .= "n--".$ob."n";
   $message .= "Content-Type: multipart/alternative;ntboundary="".$ib.""nn";
   $message .= "n--".$ib."n";
   $message .= "Content-Type: text/plain;ntcharset="iso-8859-1"n";
   $message .= "Content-Transfer-Encoding: quoted-printablenn";
   $message .= $content."nn";
   $message .= "n--".$ib."--n";
   if ($attachment_name && !$attachment_sent) {
      $message .= "n--".$ob."n";
      $message .= "Content-Type: $attachment_type;ntname="".$attachment_name.""n";
      $message .= "Content-Transfer-Encoding: base64n";
      $message .= "Content-Disposition: attachment;ntfilename="".$attachment_name.""nn";
      $message .= $attachment_chunk;
      $message .= "nn";
      $attachment_sent = 1;
   }
   $message .= "n--".$ob."--n";
   
   mail($recipient, $subject, $message, $headers);
}

Re: Fatal error: Call to undefined function: mail()

Posted: 2004-12-07 14:46
by mikrokosmos
habe selber auch mal auf dem Server recherchiert. sendmail im ordner usr/sbin/ zeigt auf var/qmail/bin/send

muß ich in den qmail settings etwa die option mail() aktiviren ????

Re: Fatal error: Call to undefined function: mail()

Posted: 2004-12-07 15:19
by duergner
Nein das ist ein PHP Problem. Hier ist due Funktion mail() nicht deklariert. Prüfe doch mal deine PHP Installation.

Re: Fatal error: Call to undefined function: mail()

Posted: 2004-12-07 16:19
by mikrokosmos
muß das in der httpd.conf deklariert werden ? in ihr kann ich nichts finden

Re: Fatal error: Call to undefined function: mail()

Posted: 2004-12-07 16:25
by mikrokosmos
ich denke nicht das es am script liegt, da diese auf den normalen 1&1 webhosting space super lief...

Re: Fatal error: Call to undefined function: mail()

Posted: 2004-12-07 16:40
by mikrokosmos
das sagt meine php.ini

Code: Select all

; overload(replace) single byte functions by mbstring functions.
; mail(), ereg(), etc are overloaded by mb_send_mail(), mb_ereg(),
; etc. Possible values are 0,1,2,4 or combination of them.
; For example, 7 for overload everything.
; 0: No overload
; 1: Overload mail() function
; 2: Overload str*() functions
; 4: Overload ereg*() functions
;mbstring.func_overload = 0

Re: Fatal error: Call to undefined function: mail()

Posted: 2004-12-07 17:57
by dodolin

Re: Fatal error: Call to undefined function: mail()

Posted: 2004-12-07 20:00
by mikrokosmos
hab die Lösung gefunden, ES LAG an de rSuse Instalaltion anscheinend hat suse 9.1 einen PHP kompilierungsfehler, ein PHP patcjh über YAST update löst das Problem.

So der formmailer sagt nun zwar das er das formular absendet, jedoch kommen keinerlei mails an. Zumidest bin ich einen Schritt weiter

Re: Fatal error: Call to undefined function: mail()

Posted: 2004-12-07 23:57
by duergner
Dann solltest du mal das mail.err Log checken.

Re: Fatal error: Call to undefined function: mail()

Posted: 2004-12-08 11:26
by mikrokosmos
hab ich... ist leere datei :), es scheint imr als ob qmail sendmail ausser gefecht gesetzt hat, aber die meissten PHP scripte berufen sich nun mal auf sendmail. werde versuchen sendmail neu aufzuspielen...

Re: Fatal error: Call to undefined function: mail()

Posted: 2004-12-08 11:39
by duergner
Nein das brauchst du nicht. qmail setzt sendmail als Alias für sein Tool.