Example #1
0
<?php }
else {

if($_FILES['scan']['tmp_name']<1000000)
if(is_uploaded_file($_FILES['scan']['tmp_name'])) 
{


  if(!copy($_FILES['scan']['tmp_name'], ".\\tmp\\".$_FILES['scan']['name']))
  echo 'Couldnt copy file!';
  $attachment = ".\\tmp\\".$_FILES['scan']['name'];
  include('Mail.php'); 
  include('mime.php'); 

$clnt = new Client;
$data = $clnt->getData($_SESSION['login']);

$text = 'THE STF HAS BEEN COMPLETED AND SIGNED
 Client name is '.$data['name'].', email is '.$data['email']; 
$crlf = "\r\n"; 
$hdrs = array( 
              'From'    => '*****@*****.**', 
              'Subject' => 'New STF' 
              ); 

$mime = new Mail_mime($crlf); 

$mime->setTXTBody($text); 
$mime->addAttachment($attachment, 'text/plain'); 

$body = $mime->get();