i just got my site taken down...apparently, someone is using our php mail() function to send out 1,000's of spam emails.
what can i do to prevent this? i'm no schooled programmer...i figured a simple contact form using mail() would be better than displaying all our email addresses where bots could get them. now it seems this method is no good either!!
is there something about this that can address this security issue? i had no idea that someone could do this and still can't say i have a clue as to how they do this!
$mail_to = $to;
$mail_subject = $_POST[subject];
$emailbody = $_POST[body];
mail($mail_to, $mail_subject, $emailbody, 'From: "'. $_POST[from] . '" <' . $_POST[replyto] . '>');