Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!
echo $this->Form->input('file', array('type' => 'file')); echo "<BR/>"; echo $this->Form->input('message', array('label' => 'Message' )); echo $this->Form->submit('Send', array('name'=>'send')); echo $this->Form->end(); ?>
$data=$this->request->data; $tmp=$data['Myemail']['file']['tmp_name']; //tmp_name of file after uploaded $tmp2=$data['Myemail']['file']['name']; //name of uploaded file rename($tmp, $tmp2); //doesnt work $message=$data['Myemail']['message']; $Email = new CakeEmail(); $Email->config('gmail2'); $email@example.com'; $Email->from( array('firstname.lastname@example.org' => 'Aptutoring')); $Email->to($to); $Email->subject('Hello'); $Email->attachments($tmp); //I want the attachment name and not the tmp_name $Email->send($message);
Join the community of 500,000 technology professionals and ask your questions.