Email wordt niet verzonden
Ik gebruik het ondetrstaande script, alles werkt alleen wordt de email niet verzonden.
Code (php)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
$fout = 0;
$verzonden = 0;
WHILE($row = mysql_fetch_assoc($query))
{
$email = $row['email'];
$naam = $row['username'];
$onderwerp = $_POST['onderwerp'];
$message = ubb($_POST['bericht']);
$message = str_replace("[user]","$naam",$message);
$bericht = '<body background="http://image.walibiclub.nl/v1.2/email/bg.png"><div align="center">';
$bericht .= '<table border="0" width="500" cellspacing="0" cellpadding="0">';
$bericht .= '<tr><td height="112" colspan="3"><img src="http://image.walibiclub.nl/v1.2/email/email.png"></td></tr>';
$bericht .= '<tr><td width="7px" background="http://image.walibiclub.nl/v1.2/email/left.png"></td>';
$bericht .= '<td width="486px" bgcolor="#FFFFFF" align="center"><font face="Tahoma" size="2"><b>'.$onderwerp.'</b></td>';
$bericht .= '</font></td><td width="7px" background="http://image.walibiclub.nl/v1.2/email/right.png"></td></tr>';
$bericht .= '<tr><td width="7px" background="http://image.walibiclub.nl/v1.2/email/left.png"></td>';
$bericht .= '<td width="486px" bgcolor="#FFFFFF"><font face="Tahoma" size="2">';
$bericht .= $message;
$bericht .= '</font></td><td width="7px" background="http://image.walibiclub.nl/v1.2/email/right.png"></td></tr>';
$bericht .= '<tr><td colspan="3"><img src="http://image.walibiclub.nl/v1.2/email/bot.png" height="4"></td></tr>';
$bericht .= '</table>';
$bericht .= '</div></body>';
$headers = "From: Walibiclub.nl<[email protected]>\r\n";
$headers .= "Reply-To: Walibiclub.nl<[email protected]>\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "X-Priority: 3\r\n"; # 1 voor erg belangrijk
$headers .= "X-MSMail-Priority: High\r\n";
$headers .= "X-Mailer: PHP/".phpversion();
$send = mail("[email protected]", "[walibiclub]$onderwerp", "$bericht", "$headers");
if($send == TRUE)
{
$verzonden++;
}
else
{
$fout++;
}
}
$verzonden = 0;
WHILE($row = mysql_fetch_assoc($query))
{
$email = $row['email'];
$naam = $row['username'];
$onderwerp = $_POST['onderwerp'];
$message = ubb($_POST['bericht']);
$message = str_replace("[user]","$naam",$message);
$bericht = '<body background="http://image.walibiclub.nl/v1.2/email/bg.png"><div align="center">';
$bericht .= '<table border="0" width="500" cellspacing="0" cellpadding="0">';
$bericht .= '<tr><td height="112" colspan="3"><img src="http://image.walibiclub.nl/v1.2/email/email.png"></td></tr>';
$bericht .= '<tr><td width="7px" background="http://image.walibiclub.nl/v1.2/email/left.png"></td>';
$bericht .= '<td width="486px" bgcolor="#FFFFFF" align="center"><font face="Tahoma" size="2"><b>'.$onderwerp.'</b></td>';
$bericht .= '</font></td><td width="7px" background="http://image.walibiclub.nl/v1.2/email/right.png"></td></tr>';
$bericht .= '<tr><td width="7px" background="http://image.walibiclub.nl/v1.2/email/left.png"></td>';
$bericht .= '<td width="486px" bgcolor="#FFFFFF"><font face="Tahoma" size="2">';
$bericht .= $message;
$bericht .= '</font></td><td width="7px" background="http://image.walibiclub.nl/v1.2/email/right.png"></td></tr>';
$bericht .= '<tr><td colspan="3"><img src="http://image.walibiclub.nl/v1.2/email/bot.png" height="4"></td></tr>';
$bericht .= '</table>';
$bericht .= '</div></body>';
$headers = "From: Walibiclub.nl<[email protected]>\r\n";
$headers .= "Reply-To: Walibiclub.nl<[email protected]>\r\n";
$headers .= "MIME-Version: 1.0\r\n";
$headers .= "Content-type: text/html; charset=iso-8859-1\r\n";
$headers .= "X-Priority: 3\r\n"; # 1 voor erg belangrijk
$headers .= "X-MSMail-Priority: High\r\n";
$headers .= "X-Mailer: PHP/".phpversion();
$send = mail("[email protected]", "[walibiclub]$onderwerp", "$bericht", "$headers");
if($send == TRUE)
{
$verzonden++;
}
else
{
$fout++;
}
}
Wat is er fout aan deze code?
met dit:
worden er ook geen fouten weergegven
Gewijzigd op 01/01/1970 01:00:00 door Robin Albers
Ik heb dit probleem ook ooit gehad en toen bleek dat mijn hosting pakket geen smpt ondersteunde.