help out a noob with a simple web development question??
I want to create a Contact-Me form on my website, but I'd like it to not go through the email client that's installed on the user's machine, in case they're at a public terminal. I don't mind if the email comes from "me" to "me", as long as nobody can use it to spam me! Is there a way to get it to safely use the SMTP server it uses when I myself send an email? (This is a Yahoo-hosted website, and I have a Yahoo ema开发者_如何学Pythonil account associated with it.)
Sure. You want a simple contact form that posts to some .php/.asp/.whatever script. That script should be able to use the SMTP server from your host (Yahoo!). You may end up sending from a different email than your personal @yahoo.com one, but just look up the info for your host.
I Googled "yahoo hosting send email" and the first result looks very relevant: http://help.yahoo.com/l/us/yahoo/smallbusiness/webhosting/php/php-17.html
As for wanting to stop spam from coming in through the form, just implement a captcha. I'd recommend using reCAPTCHA - it's free and has sample code that you can basically just plug in.
精彩评论