# Mail\_to link where the recipient is a variable

**URL:** <https://www.ruby-forum.com/t/mail-to-link-where-the-recipient-is-a-variable/96302>\
**Category:** Rails\
**Created:** [June 28, 2006, 12:22am UTC](https://www.ruby-forum.com/t/mail-to-link-where-the-recipient-is-a-variable/96302 "2006-06-28T00:22:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ptremblett](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/dc4da7/32.png) [@ptremblett](https://www.ruby-forum.com/u/ptremblett)\
**Post date:** [June 28, 2006, 12:22am UTC](https://www.ruby-forum.com/t/mail-to-link-where-the-recipient-is-a-variable/96302/1 "2006-06-28T00:22:44Z")

</div>

Hi,  
I want to put a mail\_to link in my views, where the recipient is a  
variable stored in the database. It is not clear to me how I would do  
this from reading the docs. Could someone please explain or point me  
in the right direction.

Thanks,

Paul

---

<div class="post-metadata">

**Author:** ![ptremblett](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/dc4da7/32.png) [@ptremblett](https://www.ruby-forum.com/u/ptremblett)\
**Post date:** [June 28, 2006, 5:17am UTC](https://www.ruby-forum.com/t/mail-to-link-where-the-recipient-is-a-variable/96302/2 "2006-06-28T05:17:44Z")

</div>

Paul Jonathan T. wrote:

> Hi,  
> I want to put a mail\_to link in my views, where the recipient is a  
> variable stored in the database. It is not clear to me how I would do  
> this from reading the docs. Could someone please explain or point me  
> in the right direction.
> 
> Thanks,
> 
> Paul

\<%=mail\_to @variable.stored\_in\_database, “Linky Link”%\>

?

---

<div class="post-metadata">

**Author:** ![ptremblett](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/dc4da7/32.png) [@ptremblett](https://www.ruby-forum.com/u/ptremblett)\
**Post date:** [June 28, 2006, 8:24am UTC](https://www.ruby-forum.com/t/mail-to-link-where-the-recipient-is-a-variable/96302/3 "2006-06-28T08:24:36Z")

</div>

Thanx’s David. Problem sorted out.

Regards,

Paul
