Header word niet mee verzonden in mail
Ik heb een script dat ik al met hulp van van mensen hier heb gemaakt hieronde het 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
<?php
// Your e-mail adress:
$mailto = "[email protected]";
# Maximum size of attachment in bytes:
$max_attach_size = 500000;
//*if (empty($_POST['form_submitted']))
{
}
if (isset($_POST["form_submitted"]))
{
$achternaam = $_POST['achternaam'];
$voornaam = $_POST['voornaam'];
$email = $_POST['email'];
$subject = $_POST['subject'];
$text = $_POST['text'];
$tel= $_POST[ 'Telefoon'];
$adres= $_POST['adres'];
$woonplaats= $_POST['woonplaats'];
unset($errors);
if ($email == "" and !preg_match("/^[^@]+@.+\.\D{2,5}$/", $email)) $errors[] = "e-mail address lijkt incorrect";
if ($text == "") $errors[] = "Geen bericht geplaatst";
if ($tel == "") $errors[]= "Vul A.U.B uw telefoonnummer in";
if ($voornaam == "") $errors[] = "U dient uw voornaam in te vullen";
if ($achternaam == "") $errors[] = "U dient uw achternaam in te vullen";
if ($adres == "") $errors[] = "U dient uw adres in te vullen";
if ($woonplaats == "") $errors[] = "U dient uw woonplaats in te vullen";
if ($_FILES['probe']['size'] > $max_attach_size) $errors[] = "Bijlage is te groot(".number_format($_FILES['probe']['size']/1000,0,",","")." KB) - maximum size: ".number_format($max_attach_size/1000,0,",","")." KB";
if (empty($errors))
{
$text = stripslashes($text);
$subject = stripslashes($subject);
if ($voornaam != "") $mail_voornaam=$voornaam; else $mail_voornaam="Unknown";
if ($achternaam != "") $mail_achternaam=$achternaam; else $mail_achternaam="Unknown";
if ($tel != "") $mail_tel=$tel; else $mail_tel="Unknown";
if ($adres != "") $mail_adres=$adres; else $mail_adres="Unknown";
if ($woonplaats != "") $mail_woonplaats=$woonplaats; else $mail_woonplaats="Unknown";
if ($email!= "") $mail_email=$email; else $mail_email="Unknown";
if ($subject != "") $mail_subject = $subject; else $mail_subject = "No subject";
if ($email != "") $mail_email = $email; else $mail_email = "[email protected]";
$ip = $_SERVER["REMOTE_ADDR"];
// if attachment, MIME-Mail:
if (isset($_FILES['probe']['name']) && trim($_FILES['probe']['name']) != "")
{
// read and encode file:
$datei_content = fread(fopen($_FILES['probe']['tmp_name'],"r"),filesize($_FILES['probe']['tmp_name']));
$datei_content = chunk_split(base64_encode($datei_content),76,"\n");
// Boundary:
$boundary = md5(uniqid(rand()));
// Mail-Header:
$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 = "Email: ".$mail_email."\n";
$mail_header .= "X-Sender-IP: ".$ip."\n";
$mail_header .= "MIME-Version: 1.0\n";
$mail_header .= "Content-Type: multipart/mixed; boundary=\"".$boundary."\"\n";
$mail_header .= "This is a multi-part message in MIME format.\n";
// Mail-Text:
$mail_header .= "--".$boundary;
$mail_header .= "\nContent-Type: text/plain";
$mail_header .= "\nContent-Transfer-Encoding: 8bit";
$mail_header .= "\n\n".$text;
// Attachment:
$mail_header .= "\n--".$boundary;
$mail_header .= "\nContent-Type: ".$_FILES['probe']['type']."; name=\"".$_FILES['probe']['name']."\"";
$mail_header .= "\nContent-Transfer-Encoding: base64";
$mail_header .= "\nContent-Disposition: attachment; filename=\"".$_FILES['probe']['name']."\"";
$mail_header .= "\n\n".$datei_content;
// End:
$mail_header .= "\n--".$boundary."--";
// Sende E-Mail und gebe Fehler bzw. Bestaetigung aus
if (@mail($mailto,$mail_subject,$text,$mail_header)) $sent = true; else $errors[] = "no connection to the mailserver - please try again later";
}
// no attachment, normal E-mail:
else
{
$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";
}
// copy to sender:
if (isset($sent) && isset($email) && $email != "" && isset($_POST['copy']))
{
if (isset($_FILES['probe']['name']) && trim($_FILES['probe']['name']) != "") $copy_mail_text = "Copy of the e-mail:\n\n".$text."\n\nAttachment: ".$_FILES['probe']['name']; else $copy_mail_text = "Copy of the e-mail:\n\n".$text;
$header= "From: ".$mailto."\n";
$header .= "X-Sender-IP: ".$ip."\n";
$header .= "Content-Type: text/plain";
@mail($email, $mail_subject, $copy_mail_text, $header);
}
}
}
if (empty($sent))
{
if(isset($errors))
{
?></font><p class="caution"><font color="#000000">Error:</font></p><ul>
<font color="#000000"><?php foreach($errors as $f) { ?></font><li>
<font color="#000000"><?php echo $f; ?></li><?php } ?></font></ul>
<font color="#000000"><br /><?php
}
?>
</font><form method="post" action="<?php echo basename($_SERVER["PHP_SELF"]); ?>" enctype="multipart/form-data"><div>
<p style="margin-bottom: -4px"><span class="style2"><font face="Verdana" size="2">
Voornaam</font></span><font face="Verdana" size="2"><span class="style2">:</span><br />
</font>
<font color="#FFFFFF">
<input name="voornaam" value="<?php if (isset($voornaam)) echo htmlentities(stripslashes($voornaam)); else echo ""; ?>" size="25" style="font-family: Verdana; " /></font>
</p>
<p style="margin-bottom: -4px"><span class="style2">
<font face="Verdana" size="2">Achternaam</font></span><font face="Verdana" size="2"><span class="style2">:</span><br />
</font>
<font color="#FFFFFF">
<input name="achternaam" value="<?php if (isset($achterrnaam)) echo htmlentities(stripslashes($achternaam)); else echo ""; ?>" size="25" style="font-family: Verdana; " /></font>
</p>
<p style="margin-bottom: -4px"><font face="Verdana" size="2">
<span class="style2">Adres:</span><br />
</font>
<font color="#FFFFFF">
<input name="adres" value="<?php if (isset($adres)) echo htmlentities(stripslashes($adres)); else echo ""; ?>" size="25" style="font-family: Verdana; " /></font>
</p>
<p style="margin-bottom: -4px"> <font face="Verdana" size="2"><span class="style2">Woonplaats:</span><br />
</font>
<font color="#FFFFFF">
<input name="woonplaats" value="<?php if (isset($woonplaats)) echo htmlentities(stripslashes($woonplaats)); else echo ""; ?>" size="25" style="font-family: Verdana; " />
</font>
</p>
<p style="margin-bottom: -4px"><font face="Verdana" size="2">
<br />
<span class="style2">E-mail:</span><br />
</font>
<font color="#FFFFFF">
<input name="email" value="<?php if (isset($email)) echo htmlentities(stripslashes($email)); else echo ""; ?>" size="25" style="font-family: Verdana; " /></font></p>
<p style="margin-bottom: -4px"><span class="style2">
<font face="Verdana" size="2">Telefoonnummer</font></span><font face="Verdana" size="2"><span class="style2">:</span><br />
</font>
<font color="#FFFFFF">
<input n</p name="Telefoon" value="<?php if (isset($tel)) echo htmlentities(stripslashes($tel)); else echo ""; ?>" size="25"></font></p>
<p style="margin-bottom: -4px"><font face="Verdana" size="2">
<span class="style2">Onderwerp:</span><font color="#FFFFFF"><br />
</font>
</font>
<font color="#FFFFFF">
<input name="subject" value="<?php if (isset($subject)) echo htmlentities(stripslashes($subject)); else echo ""; ?>" size="25" style="font-family: Verdana; " />
</font>
</p>
<p style="margin-bottom: -4px"> </p>
<p style="margin-bottom: -4px">Maak uw Keuze:</p>
<p style="margin-bottom: -4px" align="left"> <select size="1" name="select">
<option>Offerte</option>
<option selected>Inlichtingen</option>
</select></p>
<p style="margin-bottom: -4px"><font face="Verdana" size="2">
<font color="#FFFFFF">
<br />
</font>
<span class="style2">Bericht:</span><font color="#FFFFFF"><br />
</font>
</font>
<font color="#FFFFFF">
<textarea name="text" cols="25" rows="7" style="font-family: Verdana; "><?php if (isset($text)) echo htmlentities(stripslashes($text)); else echo ""; ?>
</textarea>
<font face="Verdana" size="2">
<br />
</font>
</font>
<font face="Verdana" size="2">
<span class="style2">Bijlagen:</span><font color="#FFFFFF"><br />
</font>
</font>
<font color="#FFFFFF">
<input type="file" name="probe" value="<?php if (isset($_POST['probe'])) echo htmlentities(stripslashes($_POST['probe'])); else echo ""; ?>" size="16" style="font-family: Verdana; "/>
</p>
</p>
<p><font face="Verdana"><input type="checkbox" name="copy" value="true" /></font></font><font size="2"> </font>
<span class="style2"><font size="2">
Kopietje naar jezelf sturen<font color="#FFFFFF">?</font></font></span><font size="2" color="#FFFFFF">
</font>
<font color="#FFFFFF">
<input type="submit" name="form_submitted" value="OK - Verzenden" style="font-family: Verdana; " /><font face="Verdana" size="2">
</font> </p>
</div>
</form>
<font color="#000000"><?php
}
else
{
if (empty($email)) { ?></font></font><font color="#000000"> </font>
<p><font color="#000000"><b><font face="Verdana" size="1">Bedankt</font></b><font size="1" face="Verdana"><b>!</b><br />
Je mail is verzonden alleen kan ik je niet terug mailen omdat je geen e-mail
adres hebt ingevuld! </font></font></p>
<font face="Verdana" size="1"><font color="#000000"><?php }
else { ?></font></font><font color="#000000"> </font>
<p><font color="#000000"><b><font face="Verdana" size="1">Bedankt</font></b><font size="1" face="Verdana"><b>!</b><br />
Je bericht is met succes verzonden ik zal zo spoedig mogelijk terug mailen. </font>
</font></p>
<font face="Verdana" size="1" color="#000000"><?php }
}
?>
// Your e-mail adress:
$mailto = "[email protected]";
# Maximum size of attachment in bytes:
$max_attach_size = 500000;
//*if (empty($_POST['form_submitted']))
{
}
if (isset($_POST["form_submitted"]))
{
$achternaam = $_POST['achternaam'];
$voornaam = $_POST['voornaam'];
$email = $_POST['email'];
$subject = $_POST['subject'];
$text = $_POST['text'];
$tel= $_POST[ 'Telefoon'];
$adres= $_POST['adres'];
$woonplaats= $_POST['woonplaats'];
unset($errors);
if ($email == "" and !preg_match("/^[^@]+@.+\.\D{2,5}$/", $email)) $errors[] = "e-mail address lijkt incorrect";
if ($text == "") $errors[] = "Geen bericht geplaatst";
if ($tel == "") $errors[]= "Vul A.U.B uw telefoonnummer in";
if ($voornaam == "") $errors[] = "U dient uw voornaam in te vullen";
if ($achternaam == "") $errors[] = "U dient uw achternaam in te vullen";
if ($adres == "") $errors[] = "U dient uw adres in te vullen";
if ($woonplaats == "") $errors[] = "U dient uw woonplaats in te vullen";
if ($_FILES['probe']['size'] > $max_attach_size) $errors[] = "Bijlage is te groot(".number_format($_FILES['probe']['size']/1000,0,",","")." KB) - maximum size: ".number_format($max_attach_size/1000,0,",","")." KB";
if (empty($errors))
{
$text = stripslashes($text);
$subject = stripslashes($subject);
if ($voornaam != "") $mail_voornaam=$voornaam; else $mail_voornaam="Unknown";
if ($achternaam != "") $mail_achternaam=$achternaam; else $mail_achternaam="Unknown";
if ($tel != "") $mail_tel=$tel; else $mail_tel="Unknown";
if ($adres != "") $mail_adres=$adres; else $mail_adres="Unknown";
if ($woonplaats != "") $mail_woonplaats=$woonplaats; else $mail_woonplaats="Unknown";
if ($email!= "") $mail_email=$email; else $mail_email="Unknown";
if ($subject != "") $mail_subject = $subject; else $mail_subject = "No subject";
if ($email != "") $mail_email = $email; else $mail_email = "[email protected]";
$ip = $_SERVER["REMOTE_ADDR"];
// if attachment, MIME-Mail:
if (isset($_FILES['probe']['name']) && trim($_FILES['probe']['name']) != "")
{
// read and encode file:
$datei_content = fread(fopen($_FILES['probe']['tmp_name'],"r"),filesize($_FILES['probe']['tmp_name']));
$datei_content = chunk_split(base64_encode($datei_content),76,"\n");
// Boundary:
$boundary = md5(uniqid(rand()));
// Mail-Header:
$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 = "Email: ".$mail_email."\n";
$mail_header .= "X-Sender-IP: ".$ip."\n";
$mail_header .= "MIME-Version: 1.0\n";
$mail_header .= "Content-Type: multipart/mixed; boundary=\"".$boundary."\"\n";
$mail_header .= "This is a multi-part message in MIME format.\n";
// Mail-Text:
$mail_header .= "--".$boundary;
$mail_header .= "\nContent-Type: text/plain";
$mail_header .= "\nContent-Transfer-Encoding: 8bit";
$mail_header .= "\n\n".$text;
// Attachment:
$mail_header .= "\n--".$boundary;
$mail_header .= "\nContent-Type: ".$_FILES['probe']['type']."; name=\"".$_FILES['probe']['name']."\"";
$mail_header .= "\nContent-Transfer-Encoding: base64";
$mail_header .= "\nContent-Disposition: attachment; filename=\"".$_FILES['probe']['name']."\"";
$mail_header .= "\n\n".$datei_content;
// End:
$mail_header .= "\n--".$boundary."--";
// Sende E-Mail und gebe Fehler bzw. Bestaetigung aus
if (@mail($mailto,$mail_subject,$text,$mail_header)) $sent = true; else $errors[] = "no connection to the mailserver - please try again later";
}
// no attachment, normal E-mail:
else
{
$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";
}
// copy to sender:
if (isset($sent) && isset($email) && $email != "" && isset($_POST['copy']))
{
if (isset($_FILES['probe']['name']) && trim($_FILES['probe']['name']) != "") $copy_mail_text = "Copy of the e-mail:\n\n".$text."\n\nAttachment: ".$_FILES['probe']['name']; else $copy_mail_text = "Copy of the e-mail:\n\n".$text;
$header= "From: ".$mailto."\n";
$header .= "X-Sender-IP: ".$ip."\n";
$header .= "Content-Type: text/plain";
@mail($email, $mail_subject, $copy_mail_text, $header);
}
}
}
if (empty($sent))
{
if(isset($errors))
{
?></font><p class="caution"><font color="#000000">Error:</font></p><ul>
<font color="#000000"><?php foreach($errors as $f) { ?></font><li>
<font color="#000000"><?php echo $f; ?></li><?php } ?></font></ul>
<font color="#000000"><br /><?php
}
?>
</font><form method="post" action="<?php echo basename($_SERVER["PHP_SELF"]); ?>" enctype="multipart/form-data"><div>
<p style="margin-bottom: -4px"><span class="style2"><font face="Verdana" size="2">
Voornaam</font></span><font face="Verdana" size="2"><span class="style2">:</span><br />
</font>
<font color="#FFFFFF">
<input name="voornaam" value="<?php if (isset($voornaam)) echo htmlentities(stripslashes($voornaam)); else echo ""; ?>" size="25" style="font-family: Verdana; " /></font>
</p>
<p style="margin-bottom: -4px"><span class="style2">
<font face="Verdana" size="2">Achternaam</font></span><font face="Verdana" size="2"><span class="style2">:</span><br />
</font>
<font color="#FFFFFF">
<input name="achternaam" value="<?php if (isset($achterrnaam)) echo htmlentities(stripslashes($achternaam)); else echo ""; ?>" size="25" style="font-family: Verdana; " /></font>
</p>
<p style="margin-bottom: -4px"><font face="Verdana" size="2">
<span class="style2">Adres:</span><br />
</font>
<font color="#FFFFFF">
<input name="adres" value="<?php if (isset($adres)) echo htmlentities(stripslashes($adres)); else echo ""; ?>" size="25" style="font-family: Verdana; " /></font>
</p>
<p style="margin-bottom: -4px"> <font face="Verdana" size="2"><span class="style2">Woonplaats:</span><br />
</font>
<font color="#FFFFFF">
<input name="woonplaats" value="<?php if (isset($woonplaats)) echo htmlentities(stripslashes($woonplaats)); else echo ""; ?>" size="25" style="font-family: Verdana; " />
</font>
</p>
<p style="margin-bottom: -4px"><font face="Verdana" size="2">
<br />
<span class="style2">E-mail:</span><br />
</font>
<font color="#FFFFFF">
<input name="email" value="<?php if (isset($email)) echo htmlentities(stripslashes($email)); else echo ""; ?>" size="25" style="font-family: Verdana; " /></font></p>
<p style="margin-bottom: -4px"><span class="style2">
<font face="Verdana" size="2">Telefoonnummer</font></span><font face="Verdana" size="2"><span class="style2">:</span><br />
</font>
<font color="#FFFFFF">
<input n</p name="Telefoon" value="<?php if (isset($tel)) echo htmlentities(stripslashes($tel)); else echo ""; ?>" size="25"></font></p>
<p style="margin-bottom: -4px"><font face="Verdana" size="2">
<span class="style2">Onderwerp:</span><font color="#FFFFFF"><br />
</font>
</font>
<font color="#FFFFFF">
<input name="subject" value="<?php if (isset($subject)) echo htmlentities(stripslashes($subject)); else echo ""; ?>" size="25" style="font-family: Verdana; " />
</font>
</p>
<p style="margin-bottom: -4px"> </p>
<p style="margin-bottom: -4px">Maak uw Keuze:</p>
<p style="margin-bottom: -4px" align="left"> <select size="1" name="select">
<option>Offerte</option>
<option selected>Inlichtingen</option>
</select></p>
<p style="margin-bottom: -4px"><font face="Verdana" size="2">
<font color="#FFFFFF">
<br />
</font>
<span class="style2">Bericht:</span><font color="#FFFFFF"><br />
</font>
</font>
<font color="#FFFFFF">
<textarea name="text" cols="25" rows="7" style="font-family: Verdana; "><?php if (isset($text)) echo htmlentities(stripslashes($text)); else echo ""; ?>
</textarea>
<font face="Verdana" size="2">
<br />
</font>
</font>
<font face="Verdana" size="2">
<span class="style2">Bijlagen:</span><font color="#FFFFFF"><br />
</font>
</font>
<font color="#FFFFFF">
<input type="file" name="probe" value="<?php if (isset($_POST['probe'])) echo htmlentities(stripslashes($_POST['probe'])); else echo ""; ?>" size="16" style="font-family: Verdana; "/>
</p>
</p>
<p><font face="Verdana"><input type="checkbox" name="copy" value="true" /></font></font><font size="2"> </font>
<span class="style2"><font size="2">
Kopietje naar jezelf sturen<font color="#FFFFFF">?</font></font></span><font size="2" color="#FFFFFF">
</font>
<font color="#FFFFFF">
<input type="submit" name="form_submitted" value="OK - Verzenden" style="font-family: Verdana; " /><font face="Verdana" size="2">
</font> </p>
</div>
</form>
<font color="#000000"><?php
}
else
{
if (empty($email)) { ?></font></font><font color="#000000"> </font>
<p><font color="#000000"><b><font face="Verdana" size="1">Bedankt</font></b><font size="1" face="Verdana"><b>!</b><br />
Je mail is verzonden alleen kan ik je niet terug mailen omdat je geen e-mail
adres hebt ingevuld! </font></font></p>
<font face="Verdana" size="1"><font color="#000000"><?php }
else { ?></font></font><font color="#000000"> </font>
<p><font color="#000000"><b><font face="Verdana" size="1">Bedankt</font></b><font size="1" face="Verdana"><b>!</b><br />
Je bericht is met succes verzonden ik zal zo spoedig mogelijk terug mailen. </font>
</font></p>
<font face="Verdana" size="1" color="#000000"><?php }
}
?>
Nu verzend hij de $mail_header niet mee hoe kan dat weet iemand wat er nog fout zit
Arjan
Gewijzigd op 01/01/1970 01:00:00 door Arjan jansen
Weet iemand waar ik moet zoeken.
Ik kom er zelf echt niet uit.
Arjan
bumpen?
Ook raad ik je swiftmailer aan, heb je al dat gekloot met mail, mailinjections en headers niet. Werkt bijna altijd...
Sowieso kloppen de regels:
61 t/m 66
90 t/m 94
104
Niet.
Kijk daar ook maar eens naar. Dat is basic php. En sowieso klopt dat niet.
Dit topic lijkt wel veel op dit topic.
Ooit gehoort van Ook raad ik je swiftmailer aan, heb je al dat gekloot met mail, mailinjections en headers niet. Werkt bijna altijd...
Sowieso kloppen de regels:
61 t/m 66
90 t/m 94
104
Niet.
Kijk daar ook maar eens naar. Dat is basic php. En sowieso klopt dat niet.
Dit topic lijkt wel veel op dit topic.
Bedankt voor de informatie het is gelukt
ik was inderdaad " "vergeten en een .
Arjan
arjan schreef op 13.05.2009 11:47:
Hallo Karl
Bedankt voor de informatie het is gelukt
ik was inderdaad " "vergeten en een .
Arjan
Bedankt voor de informatie het is gelukt
ik was inderdaad " "vergeten en een .
Arjan
Telefoonnummer, adres en weet ik veel wat zijn geen email headers.
$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";
Vanaf hier wordt $mail_header pas echt gevuld.
$mail_header = "Email: ".$mail_email."\n";
$mail_header .= "X-Sender-IP: ".$ip."\n";
$mail_header .= "MIME-Version: 1.0\n";
Dus dan zou ik dit
Code (php)
1
2
3
4
5
2
3
4
5
$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 = "Van: ".$mail_achternaam." \n";
$mail_header = "Telefoonnummer: ".$mail_tel." \n";
$mail_header = "Adres: ".$mail_adres." \n";
$mail_header = "Woonplaats: ".$mail_woonplaats."\n";
Onder dit moeten plaatsen
Code (php)
1
2
3
2
3
$mail_header = "Email: ".$mail_email."\n";
$mail_header .= "X-Sender-IP: ".$ip."\n";
$mail_header .= "MIME-Version: 1.0\n";
$mail_header .= "X-Sender-IP: ".$ip."\n";
$mail_header .= "MIME-Version: 1.0\n";
En dan geen mail_header van moeten maken maar een gewonen header of werkt dat niet???????
Wat is een gewone header?
ipv $mail_header
$header
Ik heb nu
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
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
$mail_header ="$voornaam \n";
$mail_header ="$achternaam \n";
$mail_header ="$tel\n";
$mail_header ="$email\n";
$mail_header ="$adres \n";
$mail_header = "$woonplaats \n";;
$mail_header .= "X-Sender-IP: ".$ip."\n";
$mail_header .= "MIME-Version: 1.0\n";
$mail_header .= "Content-Type: multipart/mixed; boundary=\"".$boundary."\"\n";
$mail_header .= "This is a multi-part message in MIME format.\n";
// Mail-Text:
$mail_header .= "--".$boundary;
$mail_header .= "\nContent-Type: text/plain";
$mail_header .= "\nContent-Transfer-Encoding: 8bit";
$mail_header .= "\n\n".$text;
// Attachment:
$mail_header .= "\n--".$boundary;
$mail_header .= "\nContent-Type: ".$_FILES['probe']['type']."; name=\"".$_FILES['probe']['name']."\"";
$mail_header .= "\nContent-Transfer-Encoding: base64";
$mail_header .= "\nContent-Disposition: attachment; filename=\"".$_FILES['probe']['name']."\"";
$mail_header .= "\n\n".$datei_content;
// End:
$mail_header ="$achternaam \n";
$mail_header ="$tel\n";
$mail_header ="$email\n";
$mail_header ="$adres \n";
$mail_header = "$woonplaats \n";;
$mail_header .= "X-Sender-IP: ".$ip."\n";
$mail_header .= "MIME-Version: 1.0\n";
$mail_header .= "Content-Type: multipart/mixed; boundary=\"".$boundary."\"\n";
$mail_header .= "This is a multi-part message in MIME format.\n";
// Mail-Text:
$mail_header .= "--".$boundary;
$mail_header .= "\nContent-Type: text/plain";
$mail_header .= "\nContent-Transfer-Encoding: 8bit";
$mail_header .= "\n\n".$text;
// Attachment:
$mail_header .= "\n--".$boundary;
$mail_header .= "\nContent-Type: ".$_FILES['probe']['type']."; name=\"".$_FILES['probe']['name']."\"";
$mail_header .= "\nContent-Transfer-Encoding: base64";
$mail_header .= "\nContent-Disposition: attachment; filename=\"".$_FILES['probe']['name']."\"";
$mail_header .= "\n\n".$datei_content;
// End:
Dit werkt voor de helft hij geeft me wel de adres en zo mee maar de bijlage word niet mee gegeven.
Arjan
Gewijzigd op 01/01/1970 01:00:00 door arjan jansen
Overschrijven doe je met =
$var = 'een';
$var = 'twee';
Nu is $var 'twee'.
Aanvullen doe je met .= (punt =)
$var = 'een';
$var .= 'twee';
Nu is $var 'eentwee';
Even nog een vraagje Het bovenstaande begrijp ik maar als het adres en naam enzo laat mee zenden komt de bijlage niet aan.
Heeft u een idee hoe dat kan???????
Arjan