Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Email this page to a friend i.e. working out current URL location

Status
Not open for further replies.

bluesauceuk

Programmer
Jan 1, 2001
73
GB
Hiya... just in this site. (see bottom) LINK TO THIS FORUM. How do you/they do it.

I want to implemnt an email this page to a freind in coldfusion.

Can anyone help...


Mark
 
Hi

I would try using

<CFHTTP method=Get
URL=&quot; ResolveUrl=&quot;Yes&quot;>

<CFMAIL To=&quot;myfriend@hissite.com&quot;
From=&quot;me@mysite.com&quot;
Subject=&quot;Check out this great page&quot;
Type=&quot;html&quot;>

#CFHTTP.filecontent#

</CFMAIL>

That is assuming that the cmf page needs no data sent to it to make it render correctly.

Otherwise you can do this:

<CFHTTP Method=Post
URL=&quot; ResolveUrl=&quot;Yes&quot;>

<CFHTTPParam Type=&quot;URL&quot;
Name=&quot;urlvarname&quot;
Value=&quot;#urlvarname#&quot;>
<CFHTTPparam Type=&quot;FormField&quot;
Name=&quot;FormVar&quot;
Value=&quot;#FormVar#&quot;>
... this can be done with types &quot;Cookie&quot; , &quot;CGI&quot;, and &quot;File&quot; also.


Then Email it the same as above.

Both of these are assuming that the friend can except HTML formated Email if not you can attatch it instead but I'm really bad at that so I'll let you figure that out yourself.


I tested this on my setup and it worked.
Have fun...
 
Sorry, forgot something.

Use #CGI.HTTP_REFERER# to figure out from which page they clicked on &quot;EMAIL THIS PAGE TO A FRIEND&quot;

Hope you get it working...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top