Anyone know of a way to create a dynamic send this page link (mailto:) in CF?
Maybe something like FileExists(this)?? I can create the link of course I just
to make CF generate it's own filename if that makes sense.
Thanks!
David
Daverms - 28 Nov 2007 13:13 GMT
Hi,
Write some UDF function like this once,
<cfscript>
function fnMailTo(EmailAddress)
{
return "<a href=" & "mailto:" & EmailAddress & ">" & EmailAddress & "</a>";
}
</cfscript>
And Call it like this,
<cfoutput>#fnMailTo('#your_mail_variable#')#</cfoutput>
Azadi - 28 Nov 2007 13:25 GMT
one way i'd do it is pass a getfilefrompath(cgi.script_name) in a url
variable to a page with a 'send link' from where users would enter
their's and recipient's email addresses and then the full link would be
sent via cfmail on form submit.
another way to do it would be with a mailto: link which will open an
email application. you can add thing to the link like
?subject=...&body=... to which you can pass the full url of the page
being sent.
cf makes it easy to have a custom link on each page of your website
which will send that particular page as link.
more info on mailto: link parameters here:
http://www.ianr.unl.edu/internet/mailto.html
---
Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com