Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.
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'); $firstname.lastname@example.org'; $Email->from( array('email@example.com' => 'Aptutoring')); $Email->to($to); $Email->subject('Hello'); $Email->attachments($tmp); //I want the attachment name and not the tmp_name $Email->send($message);
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.