Sorry I"m a bit of a newbie but I'm trying to set up a form on my website and when I click the submit form I get an error that reads:

Warning: mail() [function.mail]: SMTP server response: 554 The message was rejected because it contains prohibited virus or spam content in D:\Hosting\8304515\html\contact\contactformprocess.php on line 35
//-->

The line it refers to is this one:

$success = mail($webMaster, $emailSubject, $body, $headers);


And I'm not quite sure why.

Here is the code for the php file:

<?php

/* Subject and Email Variables */

	$emailSubject = 'Website Inquiry';
	$webMaster = 'info@sol-images.com';
	
/* Gathering Data Variables */

	$firstnameField = $_POST['firstname'];
	$lastnameField = $_POST['lastname'];
	$addressField = $_POST['address'];
	$citystateField = $_POST['citystate'];
	$phoneField = $_POST['phone'];
	$emailField = $_POST['email'];
	$intrestField = $_POST['intrest'];
	$dateField = $_POST['date'];
	$commentsField = $_POST['comments'];
	
	$body = <<<EOD
<br><hr><br>
First Name: $firstname <br>
Last Name: $lastname <br>
Address: $address <br>
City, State: $citystate <br>
Phone: $phone <br>
Email: $email <br>
Intrest: $intrest <br>
Date: $date <br>
Comments: $comments <br>
EOD;

	$headers = "From: $email\r\n";
	$headers .= "Content-type: text/html\r\n";
	$success = mail($webMaster, $emailSubject, $body, $headers);

	
/* Results rendered as HTML */

	$theResults = <<<EOD
<html>
<head>
<title>Sol Images</title>
//-->
<style type="text/css">
<!--
body {
		background-color: #c5c5c5;
		text-align: center;
}
-->
</style>
<link href="../site_layout.css" rel="stylesheet" type="text/css">
<link href="../site_layout_content_css" rel="stylesheet" type="text/css">
</head>
<body bgcolor="#FFFFF" leftmargin="0" topmargin"0" marginwidth="0" marginheight="0"
onLoad="MM_preloadImages('../Images/home_down.gif','../Images/gallery_down.gif','../Images/clients_down.gif','../Images/about_down.gif','../Images/contact_down.gif'.'../Images/blog_down.gif')">
<!-- Save for Web Slices (Sol Images_FINAL.psd) -->
<div id="site_layout">

  <table width="1298" height="942" border="0" align="center" cellpadding="0" cellspacing="0" id="Table_01">

    <tr>

      <td rowspan="2">

        <img src="../images/header.gif" width="425" height="178" alt=""></td>

      <td colspan="3" rowspan="2"><img src="../images/logo.jpg" width="440" height="178" alt=""></td>

      <td colspan="6">

        <img src="../images/tagline.jpg" width="433" height="52" alt=""></td>

      </tr>

    <tr>

      <td colspan="6">

        <img src="../images/header-05.gif" width="433" height="126" alt=""></td>

      </tr>

    <tr>

      <td colspan="10">

        <img src="../images/sol-images_05.gif" width="1298" height="10" alt=""></td>

      </tr>

    <tr>

      <td colspan="2">

        <img src="../images/sol-images_06.gif" width="720" height="57" alt=""></td>

      <td><a href="../index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('home','','../Images/home_down.gif',1)"><img src="../Images/home_up.gif" name="home" width="90" height="57" border="0"></a></td>

      <td colspan="2"><a href="../gallery/index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('gallery','','../Images/gallery_down.gif',1)"><img src="../Images/gallery_up.gif" name="gallery" width="93" height="57" border="0"></a></td>

      <td><a href="../clients/index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('clients','','../Images/clients_down.gif',1)"><img src="../Images/clients_up.gif" name="clients" width="93" height="57" border="0"></a></td>

      <td><a href="../about/index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('about','','../Images/about_down.gif',1)"><img src="../Images/about_up.gif" name="about" width="92" height="57" border="0"></a></td>

      <td><a href="index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('contact','','../Images/contact_down.gif',1)"><img src="../Images/contact_up.gif" name="contact" width="94" height="57" border="0"></a></td>

      <td><a href="../blog/index.html" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('blog','','../Images/blog_down.gif',1)"><img src="../Images/blog_up.gif" name="blog" width="93" height="57" border="0"></a></td>

      <td>

        <img src="../images/sol-images_13.gif" width="23" height="57" alt=""></td>

      </tr>

    <tr>

      <td height="658" colspan="10"><!-- TemplateBeginEditable name="main_content_area" -->

        <div id="site_layout_content"><center></center>

          <table width="787" border="0" align="center" cellpadding="0" cellspacing="1">

            <tr>

              <th scope="row"><img src="Sol_Images_Contact2.jpg" width="380" height="570" alt="Beautiful Wedding Photography in Las Vegas"></th>

            </tr>

            <tr>

              <th scope="row">Thank you for contacting Sol Images. You will receive a response back within one business day.</th>

            </tr>

          </table>

        </div>

      <!-- TemplateEndEditable --></td>

    </tr>

    <tr>

      <td colspan="10">

        <img src="../images/bottom_content.gif" width="1298" height="38" alt=""></td>

      </tr>

    <tr>

      <td>

        <img src="../images/spacer.gif" width="425" height="1" alt=""></td>

      <td>

        <img src="../images/spacer.gif" width="295" height="1" alt=""></td>

      <td>

        <img src="../images/spacer.gif" width="90" height="1" alt=""></td>

      <td>

        <img src="../images/spacer.gif" width="55" height="1" alt=""></td>

      <td>

        <img src="../images/spacer.gif" width="38" height="1" alt=""></td>

      <td>

        <img src="../images/spacer.gif" width="93" height="1" alt=""></td>

      <td>

        <img src="../images/spacer.gif" width="92" height="1" alt=""></td>

      <td>

        <img src="../images/spacer.gif" width="94" height="1" alt=""></td>

      <td>

        <img src="../images/spacer.gif" width="93" height="1" alt=""></td>

      <td>

        <img src="../images/spacer.gif" width="23" height="1" alt=""></td>

      </tr>

  </table>

</div>

</body>
</html>
EOD;
echo "$theResults";
?>

If anyone can help I would really appreciate it. The page is currently up on my site at www.sol-images.com/contact and you can see what is going on.

Also,

I have already unchecked my spam filter from my server so nothing should get kicked out because it's assumed to be spam and it's still not going through.

Thank you in advance!

Free Tip: It can sometimes be a lot quicker to search for your problem on the web and see what solutions other people have come up with rather than post it on a forum such as this one and hope that someone will solve it for you.

It appears that you are using GoDaddy as your web host. If that is the case, then the link below should be pertinent to your situation. If not, do some further searching on the web for the message you are getting.

http://www.phpbuilder.com/board/showthread.php?t=10367822

Well i did look at your form but you redirect so I could not reproduce the error.
Be careful with <<<EOD I prefer

$body= "<html> Name : $var; City: $city; </html>";

And as chrishea suggested SEARCH

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.