Re: How to create a link in a component

2007-09-27 Thread robechar

Generating links in a controller goes against the MVC architecture of
Cake.  A component or controller can take care of sending out an
email, but shouldn't be involved in creating its content.  That should
still be generated in a view.

I would recommend using:
For CakePHP 1.1, use PHPMailer 
http://bakery.cakephp.org/articles/view/sending-email-with-phpmailer
For CakePHP 1.2, use the built-in Email component
http://api.cakephp.org/1.2/class_email_component.html


On Sep 27, 7:00 am, deepc [EMAIL PROTECTED] wrote:
 Hello,
 i need to create a link to a controller for sending by email in a
 component.
 how can i do it? Is there a var where the url of the site is provided?


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---



Re: How to create a link in a component

2007-09-27 Thread Grant Cox

Router::url( '/your/action', true );


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups Cake 
PHP group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~--~~~~--~~--~--~---