Help with php contact form


#1

for a year I have been using the following code in my contact form

if(@mail("$email","$name","$comments",“From: $useremail\r\n”)){

it worked fine. The last few days the contact page stopped working. the host changed my contact form since my code was triggering the spam software.
Dreamhost changed it to:
//if(@mail("$email","$name","$comments")){
and now the form doesn’t work at all.
Trying to resolve the issue, they suggested I include this code:

[b]<?php
$to = ‘nobody@example.com’;
$subject = ‘the subject’;
$message = ‘hello’;
$headers = ‘Reply-To: webmaster@example.com’;

mail($to, $subject, $message, $headers);[/b]

Only, I haven’t worked with php for over a year, and no sure exactly what this means, and if I include this code, what is it replacing from the top code.

please help


#2

try to remove @ to display warning messages
if(mail("$email","$name","$comments",“From: $useremail\r\n”)){

let us know what you get


#3

Thank you!
It looks like it is working. Was the @ sign triggering dreamhost’s spam software?
Thanks again.


#4

@sign does not trigger spam software. It simply ignores warning messages.