my site have a email script which have few file to perform a simple contact form submit, i suft the net but no clue on now to make it send theattachment, my eye was blur, experts please help.
2 html + 1 php file script as below
one is html file to display the form
<form name="contactusForm" enctype="multipart/form-data" action="{$url_https}p=contact_us" method="post" onsubmit="return CheckContactusForm(this)">
....
<div class="field clearfix">
<label>Upload</label>
<input name="form[upload]" type="file" id="upload" />
</div>
...
one is php file to perform the sending script
function emailSupport($contact){
global $settings;
view()->assign("fname", $contact["fname"]);
view()->assign("subject", $contact["subject"]);
view()->assign("message", $contact["message"]);
view()->assign("email"=>$contactus["email"], "name" => $contact["fname"]);
send_mail("name@somename.com","Customer Inquiry",$message,$from, "html");
}