Code: Select all
<?php
$File = File::create(); // create temporary file
$File->name("send_to_file_name.zip"); // name temporary file
$File->sendTo(new EmailSendTo($to, $subject, $email_content, $headers));
?>Code: Select all
<?php
$File = File::create();
$File->name("send_to_file_name.rar");
$File->sendTo(new FtpSendTo($host, $user, $pass, $dir));
?>I built these so that I can easily do things to files that normally are a pain. FTPing a file quickly and easily, and Emailing a file as an attachment are both things I need to do often enough that it makes sense.
So, I am looking for some other ideas of things you think I could send a file to.