fout bij versturen van formulier
nu de site naar een andere hosting is verhuisd (register.be)
werkt het niet meer.
ik krijg de volgende foutmelding.
****************************************
********begin foutmelding******************
****************************************
Warning: mail(): SMTP server response: 501 Syntax error in recipient address in f:\websites\rb-theateraanhuis-org\contact.php on line 48
Warning: Cannot modify header information - headers already sent by (output started at f:\websites\rb-theateraanhuis-org\contact.php:48) in f:\websites\rb-theateraanhuis-org\contact.php on line 49
PHP Warning: mail(): SMTP server response: 501 Syntax error in recipient address in f:\websites\rb-theateraanhuis-org\contact.php on line 48 PHP Warning: Cannot modify header information - headers already sent by (output started at f:\websites\rb-theateraanhuis-org\contact.php:48) in f:\websites\rb-theateraanhuis-org\contact.php on line 49
****************************************
********einde foutmelding******************
****************************************
van register.be krijg ik het volgende antwoord.
****************************************
********begin antwoord*******************
****************************************
Beste klant,
Het probleem bevind zich in de mail functie, bij het definiëren van de header.
Deze code werkt wel:
mail( $MailToAddress, $MailSubject, $Message, "From: [email protected]");
Een oplossing kan je waarschijnlijk vinden op één van php forums.
****************************************
********einde antwoord*******************
****************************************
wat kan ik doen om het script weer te laten draaien als vanouds?
***********************************
********begin script******************
***********************************
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
47
48
49
50
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
47
48
49
50
<?php
$MailToAddress = "[email protected]"; // your email address
$redirectURL = "reply.php?email={$_POST['Email']}&naam={$_POST['Name']}"; // the URL of the thank you page.
# optional settings
$MailSubject = "feedback"; // the subject of the message you will receive
$MailToCC = ""; // CC (carbon copy) also send the email to this address (leave empty if you don't use it)
# in the $MailToCC field you can have more then one e-mail address like "[email protected], [email protected], [email protected]"
# If you are asking for an email address in your form, you can name that input field "email".
# If you do this, the message will apear to come from that email address and you can simply click the reply button to answer it.
# You can use this scirpt to submit your forms or to receive orders by email.
# You need to send the form as POST!
# If you have a multiple selection box or multiple checkboxes, you MUST name the multiple list box or checkbox as "name[]" instead of just "name"
# you must also add "multiple" at the end of the tag like this: <select name="myselect[]" multiple>
# and the same way with checkboxes
# This script was made by George A. & Calin S. from Web4Future.com
# There are no copyrights in the e-mails sent and we do not ask for anything in return.
# DO NOT EDIT BELOW THIS LINE ============================================================
# ver. 1.2
$Message = "";
if (!is_array($HTTP_POST_VARS))
return;
reset($HTTP_POST_VARS);
while(list($key, $val) = each($HTTP_POST_VARS)) {
$GLOBALS[$key] = $val;
if (is_array($val)) {
$Message .= "<b>$key:</b> ";
foreach ($val as $vala) {
$vala =stripslashes($vala);
$Message .= "$vala, ";
}
$Message .= "<br>";
}
else {
$val = stripslashes($val);
if (($key == "Submit") || ($key == "submit")) { }
else { if ($val == "") { $Message .= "$key: - <br>"; }
else { $Message .= "<b>$key:</b> $val<br>"; }
}
}
} // end while
$Message = "<font face=verdana size=2>".$Message;
mail( $MailToAddress, $MailSubject, $Message, "Content-Type: text/html; charset=ISO-8859-1\r\nFrom: ".$_POST['Email']."\r\nBCc: ".$MailToCC);
header("Location: ".$redirectURL);
?>
$MailToAddress = "[email protected]"; // your email address
$redirectURL = "reply.php?email={$_POST['Email']}&naam={$_POST['Name']}"; // the URL of the thank you page.
# optional settings
$MailSubject = "feedback"; // the subject of the message you will receive
$MailToCC = ""; // CC (carbon copy) also send the email to this address (leave empty if you don't use it)
# in the $MailToCC field you can have more then one e-mail address like "[email protected], [email protected], [email protected]"
# If you are asking for an email address in your form, you can name that input field "email".
# If you do this, the message will apear to come from that email address and you can simply click the reply button to answer it.
# You can use this scirpt to submit your forms or to receive orders by email.
# You need to send the form as POST!
# If you have a multiple selection box or multiple checkboxes, you MUST name the multiple list box or checkbox as "name[]" instead of just "name"
# you must also add "multiple" at the end of the tag like this: <select name="myselect[]" multiple>
# and the same way with checkboxes
# This script was made by George A. & Calin S. from Web4Future.com
# There are no copyrights in the e-mails sent and we do not ask for anything in return.
# DO NOT EDIT BELOW THIS LINE ============================================================
# ver. 1.2
$Message = "";
if (!is_array($HTTP_POST_VARS))
return;
reset($HTTP_POST_VARS);
while(list($key, $val) = each($HTTP_POST_VARS)) {
$GLOBALS[$key] = $val;
if (is_array($val)) {
$Message .= "<b>$key:</b> ";
foreach ($val as $vala) {
$vala =stripslashes($vala);
$Message .= "$vala, ";
}
$Message .= "<br>";
}
else {
$val = stripslashes($val);
if (($key == "Submit") || ($key == "submit")) { }
else { if ($val == "") { $Message .= "$key: - <br>"; }
else { $Message .= "<b>$key:</b> $val<br>"; }
}
}
} // end while
$Message = "<font face=verdana size=2>".$Message;
mail( $MailToAddress, $MailSubject, $Message, "Content-Type: text/html; charset=ISO-8859-1\r\nFrom: ".$_POST['Email']."\r\nBCc: ".$MailToCC);
header("Location: ".$redirectURL);
?>
***********************************
********einde script******************
***********************************
Gewijzigd op 01/01/1970 01:00:00 door Gaudi
Er zijn nog geen reacties op dit bericht.