php.de

Zurück   php.de > Webentwicklung > PHP Einsteiger > PHP Tipps 2004

 
 
LinkBack Themen-Optionen Thema bewerten
Alt 31.07.2004, 17:10  
Gast
 
Beiträge: n/a
Standard Fatal error: Call to undefined function: mail() in...

Hallo Leute,


Folgende Fehlermeldung erhalte ich und weis nicht warum. Könnt Ihr mir bitte weiterhelfen? Danke Dieter.


Fatal error: Call to undefined function: mail() in /webserver/members/admin/sendletter.php on line 61


Und hier die datei:


1<? include("../config.inc.php"); ?>
2<html>
3<head>
4<title>Adminbereich</title>
5<SCRIPT language=javascript>
6<!--

7function LmOver(elem, clr)
8{elem.style.backgroundColor = clr;}

9function LmOut(elem, clr)
10{elem.style.backgroundColor = clr;}

11function LmDown(elem, clr)
12{elem.style.backgroundColor = clr;}

13//-->
14</SCRIPT>
15<style>
16<!--
17a:link { text-decoration: none }
18a:hover { text-decoration: underline }
19a:active { text-decoration: none }
20a:visited { text-decoration: none }

21a.dl:link { color: #ffffff; text-decoration: none }
22a.dl:hover { color: #ffffff; text-decoration: underline }
23a.dl:active { color: #ffffff; text-decoration: none }
24a.dl:visited { color: #ffffff; text-decoration: none }
25-->
26</style>
27</head>

28<body bgcolor="#ffffff">
29<center>
30<table width="60%" bgcolor="#003366" cellspacing="1">
31<tr>
32<td background="table.gif" width="100%"><font face="arial" size="2" 33color="#ffffff">Newsletter</font></td>
34</tr>
35<tr>
36<?

37$goodcount=0;
38$badcount=0;
39$allcount=0;

40$verbindung=mysql_connect($sql_server,$sql_user, $sql_passwort);
41if (!$verbindung)
42echo "Es konnte keine Datenbankverbindung hergestellt werden.";

43mysql_select_db($sql_db, $verbindung);

44$sql = "SELECT * FROM b1gmail_users ORDER BY id ASC";
45$ergebnis = mysql_query($sql, $verbindung);
46while($row = mysql_fetch_object($ergebnis))
47{
48$empf = $row->User;
49$subj = stripslashes($betreff);
50$stxt = stripslashes($text);
51$head = "From:newsletter@mail";
52$resu = mail($empf,$subj,$stxt,$head);
53if ($resu) {
54$goodcount++;
55} else {
56$badcount++;
57}
58$allcount++;
59}

60mysql_free_result($ergebnis);

61mysql_close($verbindung);

62?>
63<td bgcolor="#336699" width="100%" align="center"><font face="arial" size="2" color="#ffffff">
The newsletter has been sended.

Sended: <? echo($goodcount); ?>
Not sended: <? echo($badcount); ?>
All: <? echo($allcount); ?>





</font></td>
</tr>
</table>
</center>
</body>
</html>
 
Sponsor Mitteilung
PHP Code Flüsterer

Registriert seit: 21.08.2005
Beiträge: 4682
PHP-Kenntnisse:
Fortgeschritten

Alt 31.07.2004, 17:18  
Gast
 
Beiträge: n/a
Standard

Das sieht so aus, als wenn die mail-Funktion abgeklemmt wäre. Auf was für einem Server läuft das Script??

Gruß
phpfan
 
Alt 31.07.2004, 17:19  
Gast
 
Beiträge: n/a
Standard

Schau dir mal die Mail()-Anforderungen an:

http://de3.php.net/manual/de/ref.mail.php
 
Alt 31.07.2004, 17:20  
Gast
 
Beiträge: n/a
Standard

auf Linux.
Kann man dies beheben (habe keinen AdminZugriff auf den Server).
Kann man die Funktion über einen anderen Server laufen lassen? Und wenn ja wie sieht dies in PHP aus.
 
Alt 31.07.2004, 17:22  
Gast
 
Beiträge: n/a
Standard

Frage mal deinen Hoster was er zum Mailen verwendet.
 
Alt 31.07.2004, 17:25  
Gast
 
Beiträge: n/a
Standard

Du könntest es mal mit dem phpMailer von http://phpmailer.sourceforge.net/ ausprobieren. Eine gute Anleitung findest Du hier: http://www.phpforum.de/forum/phpforu...091284719.html

Gruß
phpfan
 
 


Themen-Optionen
Thema bewerten
Thema bewerten:

Forumregeln
Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are an
Gehe zu

Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
mail() : undefined function ?? malabarista PHP Tipps 2006 1 23.03.2006 13:05
mail () : undefined function ??? malabarista PHP Tipps 2006 4 13.03.2006 14:52
undefined function: str_split() bei PHP v4.4.1 PHP Tipps 2007 9 25.11.2005 15:38
Fatal error: Call to undefined function: imagettftext() Sclot PHP Tipps 2005 2 26.08.2005 13:26
Fatal error: Call to undefined function mail() PHP Tipps 2005-2 16 04.07.2005 13:24
[Erledigt] Error Mail() function PHP Tipps 2005 3 14.04.2005 03:32
[Erledigt] undefined function mysql_connect() ? Datenbanken 6 09.02.2005 11:40
Fatal error: Call to undefined function ora_logon() in file PHP Tipps 2005 2 25.01.2005 17:30
Fatal error: Call to undefined function: imagecreatefromjpeg DannyD PHP-Fortgeschrittene 10 05.12.2004 21:59
Fatal error: Call to undefined function mysql_connect() Datenbanken 4 11.11.2004 17:53
call to undefined function mail() <- funktionierte bis ge Promaetheus PHP Tipps 2004 9 07.10.2004 11:39
[Erledigt] Call to undefined function highlight() PHP Tipps 2004 1 07.09.2004 09:31
[Erledigt] Probleme beim PHP5 kompilieren / zlib fehler? Server, Hosting und Workstations 4 03.09.2004 15:39
Fatal error: Call to undefined function: sqlite_open()..... PHP Tipps 2004 11 01.08.2004 17:44
[Erledigt] Fatal error: Call to undefined function:... PHP Tipps 2004 8 27.06.2004 12:56

Besucher kamen über folgende Suchanfragen bei Google auf diese Seite
call to undefined function mysql_fetch_object, call to undefined function: mysql_fetch_objekt, call to undefined function mysql_fetch_object(), php included function \call to undefined function\, fatal error text, call undefined function mysql_fetch_object(), fatal error: call to undefined function send_email(), fatal error: call to undefined function head() in, call to undefined function mysql_fetch_objekt(), fatal error mail function, fatal error: call to undefined function: mail() in, fatal error mail, fatal error: call to undefined function mysql_fetch_objekt()

Alle Zeitangaben in WEZ +2. Es ist jetzt 03:47 Uhr.




Powered by vBulletin® Version 3.7.2 (Deutsch)
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
Aprilia-Forum, Aquaristik-Forum, Liebeskummer-Forum, Zierfisch-Forum, Geizkragen-Forum

Creative Commons License
Dieser Inhalt ist unter einer Creative Commons-Lizenz lizenziert.