Page 1 of 1
email to a friend link?
Posted: Fri Nov 25, 2005 8:31 am
by dirksmith
hi
does anyone know how to create an 'email this page to a friend' link?
how is this done?
Many thanx
dirk
Posted: Fri Nov 25, 2005 8:49 am
by php3ch0
Try
Code: Select all
<a href="mailto:someone@somewhere.com
?subject=Check out this cool website
&body=Look at this cool website http://www.gohere.com.">
Email this page to a friend</a>
thank u
Posted: Fri Nov 25, 2005 9:04 am
by dirksmith
thanx very much for that - cool simple solution!
Posted: Fri Nov 25, 2005 9:16 am
by php3ch0
Thanks I try my best!
Posted: Fri Nov 25, 2005 12:35 pm
by Ambush Commander
The problem with that is it's nonstandard: not all email clients will allow ?subject=...
email to a friend link?
Posted: Fri Nov 25, 2005 2:46 pm
by dirksmith
yeah - just found that out - the link arrives as a dat file with which needs to be downloaded.
any ideas on a Javascript method of doing this?
Posted: Fri Nov 25, 2005 2:49 pm
by Ambush Commander
Probably can't be done. What you'll have to do is have the server send the email itself. But there are security implications, so make sure you ask before you try banging something out with mail(). I suggest using PHPMailer.
js solution
Posted: Fri Nov 25, 2005 3:07 pm
by dirksmith
just found javascript solution which is working fine - less involved than the php route:
http://javascript.internet.com/buttons/e-mail-link.html