Forum Moderators: coopster
--397762125-123729819-1382094641=:59273
Content-Type: multipart/alternative; boundary="397762125-2116717784-1382094641=:59273"
--397762125-2116717784-1382094641=:59273
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Body text goes here.=A0- John Bilicki III
--397762125-2116717784-1382094641=:59273
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
<p>1111111111111111</p>
--397762125-2116717784-1382094641=:59273--
--397762125-123729819-1382094641=:59273
Content-Type: image/gif; name="secret_afound.gif"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="secret_afound.gif"
R0lGODlhDwAPAJEAAP8A/////wAAAAiXCCH5BAEAAAAALAAAAAAPAA8AAAI7
hC2Zx5AD4WIihAitOGJcnA2bA37R1mGWKXXsK1YWmGkuHV1PrPSSI5MFgiOH
ZhWkrJaahnBZpPQmhgIAOw==
--397762125-123729819-1382094641=:59273
Content-Type: image/gif; name="secret_aunlocked.gif"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="secret_aunlocked.gif"
R0lGODlhDwAPAJEAAP8A/////wAAAP8AACH5BAEAAAAALAAAAAAPAA8AAAI7
hC2Zx5AD4WIihAitOGJcnA2bA37R1mGWKXXsK1YWmGkuHV1PrPSSI5MFgiOH
ZhWkrJaahnBZpPQmhgIAOw==
--397762125-123729819-1382094641=:59273--
<?php
$headers = "From: someone@example.com\nReply-To: someone@example.com";
$headers .= "\n".'Content-Type: multipart/mixed; boundary="--397762125-123729819-1382094641=:59273"';
ob_start();
?>
--397762125-123729819-1382094641=:59273
Content-Type: multipart/alternative; boundary="397762125-2116717784-1382094641=:59273"
--397762125-2116717784-1382094641=:59273
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
Body text goes here.=A0- John Bilicki III
--397762125-2116717784-1382094641=:59273
Content-Type: text/html; charset=iso-8859-1
Content-Transfer-Encoding: quoted-printable
<?php echo quoted_printable_encode(trim($_POST['post_body']));?>
--397762125-2116717784-1382094641=:59273--
--397762125-123729819-1382094641=:59273
<?php
$attachments = array();
$count4 = 0;
$i = 0;
$query4 = "SELECT data, filename, type FROM email_attachments WHERE id_email='0' AND (";
foreach ($_POST as $k => $v)
{
if (substr($k,0,15)=='post_attachment')
{
if ($v!='')
{
if ($i>0) {$query4 .= " OR filename='$v'";}
else {$query4 .= "filename='$v'";}
$count4++;
$i++;
}
}
}
$query4 .= ');';
$result4 = mysql_query($query4);
if ($result4)
{
$i = 1;
while ($row4 = mysql_fetch_assoc($result4))
{
?>
Content-Type: <?php echo $row4['type'];?>; name=<?php echo $row4['filename'];?>
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=<?php echo $row4['filename'];?>
<?php
echo wordwrap(base64_encode($row4['data']),'60',"\n",true)."\n";
if ($i<$count4)
{
?>
--397762125-123729819-1382094641=:59273
<?php
}
$i++;
}
?>
--397762125-123729819-1382094641=:59273--<?php
$message = ob_get_clean();
$mail_sent = @mail('someone@yahoo.com','Subject Test',$message,$headers);
echo $mail_sent ? "Mail sent" : "Mail failed";
echo "\r\n";
echo $message;
}
else {mysql_error_report($query4,mysql_error(),__FUNCTION__);}
die();
?>
Generally with email generation the line endings are important, so this could be significant.
There's a constant you can use - PHP_EOL.