hi i'm creating mailto with cakephp email components to share the post
how do i do this with the form the have to fill out

form:
to:
comment:

then submit send that post id and the content of post  this is i did
so far  when i go to posts/sharethis/22 it sends email but wont let me
fill the form first




function sharethis($id) {
    $this->layout = null;
    $Post = $this->Post->read(null,$id);
    $this->Email->to =  $this->data['Post']['to'],;
    $this->Email->bcc = array('sec...@example.com');
    $this->Email->subject = 'Welcome to our really cool thing';
    $this->Email->replyTo = 'supp...@example.com';
    $this->Email->from = $this->data['Post']['from'],;
    $this->Email->template = 'Post'; // note no '.ctp'
    //Send as 'html', 'text' or 'both' (default is 'text')
    $this->Email->sendAs = 'html';

     $this->set('post', $this->Post->read(null, $id));

 if ( $this->Email->send() ) {

                    $this->redirect('/thankyou');
                        } else {
                                $this->Session->setFlash(__('this could not be 
saved. Please, try
again.', true));
                        }
 }

<?php
                echo $form->create('post', array('action' =>
'sharethis'));
                echo $form->inputs(array('legend' => false,
                                         'fieldset' => false,
                                         'from',
                                         'to',
                                         'comments' => array('row' =>
10,
                                                             'cols' =>
45,
                                                             ),
                                         ));


                                echo $form->submit('/img/submit.gif', 
array('alt' =>
'Submit','class' => 'image'));
                                echo $form->end();
            ?>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to 
cake-php+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to