Jak wysłać tym sposobem plik nie samą wiadomość tekstową?
<?php
$wynik='dadadadadadada';
$wynik .= PHP_EOL;
$plik="pliczek.txt";
$fp = fopen($plik, "w");
flock($fp, 2);
fwrite($fp,$wynik);
flock($fp, 3);
fclose($fp);
require 'Mail.php';
$mail=new Mail();
$headrs=array(
'From' => '[email protected]',
'Subject' =>'Helow'
);
$auth=array(
'auth' => true,
'host' => 'xxxxxxme.pl',
'username' =>'[email protected]',
'password' => 'xxxxxx'
);
$smtp=$mail->factory('smtp',$auth);
$smtp->send('[email protected]',$headrs,$fp);
?>