ok...i'll try again...thanks...
error message = "Parse error: parse error, unexpected T_STRING in /home/vaskaco/public_html/mailer.php on line 8"
jv
edit: a note...on about line 19..."Content-Type: multipart/mixed;\n" . - this line does not show up properly on the page, but it DOES have the "\"...it's even there when i look at it as i edit...very weird...it IS there, just ignore that ommission by this web page...
<?
$fileatt = "";
$fileatt_type = "application/octet-stream";
$fileatt_name = "";
$email_from = "";
$email_subject = ""; <---- this is LINE 8
$email_message = "";
$email_to = "emailstufftome@yahoo.com";
$headers = "From: ".$email_from;
$semi_rand = md5(time());
$mime_boundary = "==Multipart_Boundary_x{$semi_rand}x";
$headers .= "\nMIME-Version: 1.0\" .
"Content-Type: multipart/mixed;\n" .
" boundary=\"{$mime_boundary}\"";
$email_message .= "This is a multi-part message in MIME format.\n\n" .
"--{$mime_boundary}\n" .
"Content-Type:text/html; charset=\"iso-8859-1\"\n" .
"Content-Transfer-Encoding: 7bit\n\n" .
$email_message . "\n\n";
$fileatt = "";
$fileatt_type = "application/octet-stream";
$fileatt_name = "";
$file = fopen($fileatt,'rb');
$data = fread($file,filesize($fileatt));
fclose($file);
$data = chunck_split(base64_encode($data));
$email_message .= "--{$mime_boundary}\n"
"Content-Type: {$fileatt_type};\n" .
" name=\"{$fileatt_name}\"\n .
$data . "\n\" .
"--{{$mime_boundary}--\n";
unset($data)
unset($file)
unset($fileatt)
unset($fileatt_type)
unset($fileatt_name)
$submit = @mail($email_to, $email_subject, $email_message, $headers);
if($submit) {
echo "<font face=verdana size=2>Successfully sent!</font>";
} else {
die("Nada send..."); }
?>
<html>
<head>
<title>Vaska</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<FORM NAME="form1" METHOD="post" ACTION="" enctype="multipart/form-data">
<table width="324" border="0" cellpadding="0" cellspacing="0" bgcolor="#f3f3f3">
<tr>
<td width="125" align="right" valign="top"></td>
<td width="199" align="left" valign="top"> </td>
</tr>
<tr>
<td height="24" align="right" valign="top" class="mmbody">File: </td>
<td align="left" valign="top">
<input type="file" name="fileatt">
</td>
</tr>
<tr>
<td height="24" align="right" valign="top" class="mmbody">File Name: </td>
<td align="left" valign="top">
<input type="text" name="fileatt_name">
</td>
</tr>
<tr>
<td height="24" align="right" valign="top" class="mmbody">Email: </td>
<td align="left" valign="top">
<input type="text" name="email_from">
</td>
</tr>
<tr>
<td height="24" align="right" valign="top" class="mmbody">Subjectl: </td>
<td align="left" valign="top">
<input type="text" name="email_subject">
</td>
</tr>
<tr>
<td height="24" align="right" valign="top" class="mmbody">Message: </td>
<td align="left" valign="top">
<textarea name="email_message" wrap="VIRTUAL"></textarea>
</td>
</tr>
<tr>
<td align="right" valign="top" class="mmbody"> </td>
<td align="left" valign="top">
<input type="submit" name="submit" value="Submit">
</td>
</tr>
</table>
</form>
</body>
</html>