can anyone explai me to how to use mail to link in yii .
thanx in advance
can anyone explai me to how to use mail to link in yii .
thanx in advance
Your question isn’t really clear. Do you wish to create a link to a specific part of your Yii app which can be sent out via e-mail? If so, createAbsoluteUrl() is for you.
I need when click the link open mail server.can u help me to create that
Your question still makes little sense. What do you mean by "open [a] mail server?" Do you want to compose an e-mail? in that case, use the mailto url scheme.
I need that in to yii way
ho do I code that in yii
Well, let’s say you’ve got a model called [font=“Courier New”]User[/font] and you’ve called an instanced and bound it to [font=“Courier New”]$user[/font]. Let’s further say said model has a property called [font=“Courier New”]email[/font], holding the user’s email address. The easiest way to display a mailto link would be this:
<?php echo CHtml::link(CHtml::encode($user->email),'mailto:'.$user->email); ?>
Within [font="Courier New"]CDetailView[/font]s and [font="Courier New"]CGridView[/font]s, you can set fields to the type email, which will do this automaticaly for you.
thank you very much your reply and explanation.