English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

$to="email@email.com";
$subject="Trial";
$msg="This is an trial message Hopefully it works";
$sender="sender@email.com";

if(mail($to,$subject,$msg,"From:$sender"))
{
echo "output=sent";
}
else
{
echo "output=error";
}
?>

Why the site always gives me the "output=error" message
even I've checked the availabilty of the php in the site and the site supports php 100%??
Please I need all the available help
I've checked dozen of codes but with the same error message :( can any body help me

2007-03-30 09:42:17 · 1 answers · asked by CS 1 in Computers & Internet Programming & Design

First, thanks for answering my question.
Second, yes I've changed the form's To and From to valid addresses and I've checked them by sending e-mail to those addresses.
I don't know if my server need authentecation but I guess and I'm sure that this option doesn't exist in the server's option.

I really checked many information, many codes and many tutorials but I couldn't accomplish anything
And i don't know the real reason
please guide me and tell me tha answer..

2007-03-30 10:18:15 · update #1

1 answers

Well that is the basic format for mail, did you change the To and from to valid addresses?
Is your server requiring authentication for auto posted forms
Do you need authentication?
When you send email from your mail program, do you need to provide a password for outgoing mail (outgoing mail authentication?). If you are unsure because you set up your mail a long time ago, the best thing to do is ask your host. If you do need outgoing authentication, the mail () function won't work. There are work arounds.

Mail forms are getting tricker these days because spammers have found them easy to use as a multimail base if they are not properly put together, as a result hosting companies are making it more difficult to just "send". Check your hosts support area, I bet they cover it.

There are several php helps for this, check out the php information.

2007-03-30 09:53:02 · answer #1 · answered by Tracy L 7 · 0 0

fedest.com, questions and answers