PDA

View Full Version : Send to Friend script



ozgression
11-29-2004, 04:09 PM
I am looking for code/script that i can put on the recipe pages on my recipe site so that there is a simple form allowing people to "send" a link to the recipe they are viewing to a friend.

Something that displays sender name, sender email, email of recipient and in the email:

"name" thought you might enjoy this recipe at http://www.domain.com/recipe

Any ideas how to do this?

Cheers...
________
F2005 (http://www.ferrari-wiki.com/wiki/Ferrari_F2005)

r2d2
11-29-2004, 05:35 PM
Using PHP?

Use a form to get the senders email address, name, recipients email, and use a hidden input to contain the recipe url, then the action page for the form should send the email using PHPs mail function.

Thats how I would probably do it.

You might want to watch the fact that people will get the email from you and they wont have asked for it (could be called spam).

ozgression
11-29-2004, 05:51 PM
Actually i want them to get it from their friend. Their friend's email address. So i dont feel ther will be any SPAM issues.

Do you have any examples/links of the php form? I don't know php very well.

Cheers...
________
bho hash oil (http://trichomes.org/hashish/bho-hash-oil)

r2d2
11-30-2004, 01:43 AM
If you want it to come from them, then they will have to send the email themselves.

(The only way to send it 'from' them would be to get their smtp server, and email username & password, and I'm sure that would actually be possible, never mind a bit silly :) )
You have to put something like a 'Ctrl-A, Ctrl C this text below, and paste it into your email page' thing.

Anyone else have any ideas?

AndyH
11-30-2004, 01:58 AM
<a href="mailto:?subject=Check%20Out%20This%20Website&body=http://www.example.com">Click here to tell a friend.</a>

I think that is the only way if you want the visitor to send it from them and not your server.

Westech
11-30-2004, 08:14 AM
The problem with the code above is that if the visitor doesn't have a default email client set up correctly on their computer (a lot of people don't) then the link won't work.

If you use server side scripting (like PHP) to send the email , you can set the email address the user provides as the "reply-to" address, but the email will still actually come from your server, and if it's reported as spam you'll be the one that has to deal with it.

I spent a lot of time looking into this problem a while back, and the best solution I found was to set up a script that stores the information that each user submits but doesn't send it out. Then, every day or two, you would manually check the list of stored tell-a-friend submissions and approve each one to be sent if it doesn't look like spam. This would give you the added bonus of getting to read what people are writing about your site.

I haven't actually implemented this on any of my sites yet, but that's the way I plan to do it when I find the time.

ozgression
11-30-2004, 04:12 PM
If you use server side scripting (like PHP) to send the email , you can set the email address the user provides as the "reply-to" address, but the email will still actually come from your server, and if it's reported as spam you'll be the one that has to deal with it.

Yes, this is what i meant. The person will see their friend's email address as the sender. Honestly guys, i dont think SPAM will be an issue with this site.

Anyway, I basically want something like this - http://www.cj-design.com/index.php?content=downloads&page=3 . Except, I want the form to be displayed on my page instead of on a different page. Is there a way to modify the above script?

Cheers...
________
spice weed (http://syntheticweed.org)

thebillionaire
12-08-2004, 02:21 PM
you guys should try flash sending script thing, they look cool, and there prob. easy to make.

Emancipator
12-08-2004, 03:29 PM
i have a script in php I use, I will try and fish it out, been awhile since i used it.

ozgression
12-08-2004, 04:16 PM
That would be great... I would really appreciate it :)
________
Honda CM400 (http://www.honda-wiki.org/wiki/Honda_CM400)