problem: mail() has been disabled?

Status
Not open for further replies.

Domain

New Member
Messages
3
Reaction score
0
Points
0
When I try to use the php mail function I get this error
Code:
 [B]Warning[/B]: mail() has been disabled for security reasons in [B]/home/knight/public_html/send.php[/B] on line [B]29[/B]
what's the problem?

ty in advance
 

lambada

New Member
Messages
2,444
Reaction score
0
Points
0
As far as i'm aware mail() shouldn't be disabled, maybe it's your usage of it - What parameters are you passing to it? You can blank out your e-mail address if you want.
 

nightscream

New Member
Messages
948
Reaction score
0
Points
0
well my code
Code:
<?php
$email = mymail@hotmail.com;
$target = (stripslashes(trim($_POST['target'])));
$title = (stripslashes(trim($_POST['title'])));
$body  = (stripslashes(trim($_POST['body'])));
$header = "From: $email\n";

$header .= "Content-type: text/html\n";

$regex="/^[a-zA-Z][\w \.\-]+[a-zA-Z0-9]@([a-zA-Z0-9][a-zA-Z0-9\-]*\.)+[a-zA-Z]{2,4}$/";
if($target == "" || !preg_match($regex, $target)){
    echo "<font color='red'><b> Error: No Target Email Provided or Email Invalid! </font></b>";
exit;
}
elseif($title == ""){
    echo "<font color='red'><b> Error: No Email Title Provided! </font></b>";
exit;
}
elseif($body == ""){
    echo "<font color='red'><b> Error: No Email Body Provided! </font></b>";
exit;
}

mail($target, $title, $body, $header);
echo "Mail Was Sent!";
?>
 

t2t2t

New Member
Messages
690
Reaction score
0
Points
0
possibleansweryi9.png

http://www.x10hosting.com/hosting
May be the answer...
 

Corey

I Break Things
Staff member
Messages
34,551
Reaction score
204
Points
63
Hi,

We're still fixing everything from our recent server moves. We are looking into ways to enable PHP Mail on an account by account basis to stop spammers who seem to like signing up for our services. Hopefully we'll have a solution by the end of this week.

Yes, t2t2t is correct, it is off by default on our ad free hosting.

-Corey
 

nightscream

New Member
Messages
948
Reaction score
0
Points
0
Well he is my bro, he wanted a website so I said he should come here..
but never mind he picked the ad free i guess..
so the problem is solved
 
Last edited:
Status
Not open for further replies.
Top