What I want it to do is to check if someone has entered the optional message or not, and if not, to just send the default recommendation line. I want it to only say "Here is their personal message to you: $message" if they actually entered something in the message field.
Also, if someone does work on this, please correct the line "YOu can send an email to another friend if you want" to read "You can send an e-mail to another friend if you want."
In any case, I'll just leave the original file up and anyone who wants to take this one up can do so.
Otherwise, just set up a page for your code on your site, much like Hannes recently did for a patch of his.
I've created my account, but I'm at a loss regarding the following isntruction: "Take special note of the sourceforge instructions to create your CVS home directory - something you have to do with every new account to "enable" it for CVS. Basically you just have to use ssh to interactively connect to cvs.sourceforge.net."
Hi N,
Thanks for your efforts on providing this script. Be warned though, PHP can get highly addictive
I installed it on a testserver to try it out. It seems you can bypass the form and automatically send emails by appending the data to the scriptname
Type in http://www.nameofserver.com/tellfriend/tellfriendscript.php?friend_name=xxx&friend_email=xxx&recipient=xxx&message=xxx directly in the location bar of your browser and an email is on it's way.
A student with too much spare time could (as far as I know) use a script to loop through a list of email addresses and send lots of anonymous mails using your webserver.
Maybe you want to look further into this before using it on a production server. Have you removed parts of the code from the original?
I don't remember removing code-if anything, I added code. I added the function whereby it will also send a copy of the email to the admin, so if someone started doing this the admin would know fairly quickly at least. Even if they were anonymous emails, they would be anonymous emails recommending my site. It's not like it could easily be used to send emails with subject lines like "Cialis" and "Next of Kin in Nigeria."
I tried reading up on the vulnerability of php mail and it seems that it isn't really designed for spammers anyway because it has to send each email individually.
But perhaps if someone is able to integrate it more closely into Moodle, this problem could be avoided?
The "http://www.mysite.com/mod/resource/view.php?id=75" in the attached file is the path to the frames page that includes the tellafriend.php. Once I uploaded this, I tried accessing my page as you did, and it simply loaded the whole frames page, without the automatically filled in values.