Foutmelding bij contactformulier
kitty N
18/05/2009 15:52:00In het volgende stukje:
Overschrijf je de eerste paar keer je $mail_header. Bij de laatste 2 gebruik je wel .= moet bij de rest ook lijkt me, dus zo:
Code (php)
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
<?php
$mail_header = "Van: ".$mail_voornaam." \n";
$mail_header = "Van: ".$mail_achternaam." \n";
$mail_header = "Telefoonnummer: ".$mail_tel." \n";
$mail_header = "adres: ".$mail_adres." \n";
$mail_header = "Woonplaats: ".$mail_woonplaats."\n";
$mail_header .= "X-Sender-IP: $ip\n";
$mail_header .= "Content-Type: text/plain";
if (@mail($mailto,$mail_subject,$text,$mail_header)) $sent = true; else $errors[] = "no connection to the mailserver - please try again later";
}
?>
$mail_header = "Van: ".$mail_voornaam." \n";
$mail_header = "Van: ".$mail_achternaam." \n";
$mail_header = "Telefoonnummer: ".$mail_tel." \n";
$mail_header = "adres: ".$mail_adres." \n";
$mail_header = "Woonplaats: ".$mail_woonplaats."\n";
$mail_header .= "X-Sender-IP: $ip\n";
$mail_header .= "Content-Type: text/plain";
if (@mail($mailto,$mail_subject,$text,$mail_header)) $sent = true; else $errors[] = "no connection to the mailserver - please try again later";
}
?>
Overschrijf je de eerste paar keer je $mail_header. Bij de laatste 2 gebruik je wel .= moet bij de rest ook lijkt me, dus zo:
Code (php)
1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11
<?php
$mail_header = "Van: ".$mail_voornaam." \n";
$mail_header .= "Van: ".$mail_achternaam." \n";
$mail_header .= "Telefoonnummer: ".$mail_tel." \n";
$mail_header .= "adres: ".$mail_adres." \n";
$mail_header .= "Woonplaats: ".$mail_woonplaats."\n";
$mail_header .= "X-Sender-IP: $ip\n";
$mail_header .= "Content-Type: text/plain";
if (@mail($mailto,$mail_subject,$text,$mail_header)) $sent = true; else $errors[] = "no connection to the mailserver - please try again later";
}
?>
$mail_header = "Van: ".$mail_voornaam." \n";
$mail_header .= "Van: ".$mail_achternaam." \n";
$mail_header .= "Telefoonnummer: ".$mail_tel." \n";
$mail_header .= "adres: ".$mail_adres." \n";
$mail_header .= "Woonplaats: ".$mail_woonplaats."\n";
$mail_header .= "X-Sender-IP: $ip\n";
$mail_header .= "Content-Type: text/plain";
if (@mail($mailto,$mail_subject,$text,$mail_header)) $sent = true; else $errors[] = "no connection to the mailserver - please try again later";
}
?>
PHP hulp
07/05/2024 06:59:26telefoonnummer, adres en woonplaats zijn geen email headers, dus die horen ook niet in de headers te zitten.