Forum Moderators: coopster
I just read that the javascript mailto function could be a problem for some email systems, so I decided to see if this could be done in php. All I want is a simple form that asks the user their name and their friend's email address. This is then fed into the mailing along with the current page URL and a brief message.
Can this be done in php?
Am I correct that using javascript/mailto could be a problem as compared to programming this in php, or am I going to have the same problem?
What is the best way to code a tell-a-friend script so everyone is able to use it regardless of their email program, and I am able to capture the page URL in an email?
Thank you!
you could catch the url with this code:
$dirandfile = $_SERVER['PHP_SELF'];
$domain = $_SERVER['SERVER_NAME'];
$url = "http://$domain$dirandfile";
and for mailing you can use the mail() function.
I guess the issue of spamming wouldn't be a problem if I use the mailto function. The emails would be coming directly from the user's email, rather than from my site. The mailto would open the user's email program.
I just got nervous when I read something about the mailto function and people using aol. Unfortunately, I can't find the post again (came across it during one of my Google searches). Thought I'd find out if it was true or not.
I still am unsure if I am better off using javascript or php?