PDA

View Full Version : SendToAFriend with custom fields



nycguurl
06-26-2007, 02:58 AM
I can't check this myself, because Juno is overriding Outlook Express, so no email program can open for me through internet shortcuts. Here's the script:

<a href="mailto:?subject=Your friend recommends this link &cc= &bcc= &body=Your friend was on our site, and wants you to see this:<br>http://mysite.com">Send to a friend</a>

All I want to know is:
1) Does it open an email for you with the custom subject and body I put?
2) For the site link in the body, does it appear on the second line since I put the <br> in there?

Just trying to make sure it's fine before I publish. Thanks!

Jas
06-26-2007, 11:45 PM
The break will work, and as far as I know, the subject should work. I'll test it in a few minuets for you to find out.

Jas
06-26-2007, 11:55 PM
Sorry, I mis-read the code the first time. I thought the <br> was for the page, not the Email. In any case, here is the correction to your code:


<a href="mailto:?subject=Your friend recommends this link &cc= &bcc= &body=Your friend was on our site, and wants you to see this &#37;0D%0A http://mysite.com">Send to a friend</a>


Hope this solves the problem for you.

thetestingsite
06-26-2007, 11:57 PM
Note: the above will work (on Windows, not sure about any other OS), as long as the user has a default mail client set up on their computer. If they don't, then they get nothing. Also, doing this is a bad idea mostly because of SPAM. I recommend looking into getting a server side form to email script.

Anyways, hope this helps.

Veronica
06-26-2007, 11:57 PM
The <br> shows up as is, as part of the email message. The rest of it works fine.

To put a line break, try this:

<a href="mailto:?subject=Your friend recommends this link &cc= &bcc= &body=Your friend was on our site, and wants you to see this:&#37;0Ahttp://mysite.com">Send to a friend</a>

Jas
06-27-2007, 12:14 AM
<a href="mailto:?subject=Your friend recommends this link &cc= &bcc= &body=Your friend was on our site, and wants you to see this:&#37;0Ahttp://mysite.com">Send to a friend</a>

/\ I would go with that one /\
Mine has a slight flaw, sorry. . .(it brings you to a search page at the same time).

nycguurl
06-28-2007, 04:39 AM
Thank you sooo much guys! :o