Email probleme

Status
Not open for further replies.

Aravinthan

New Member
Messages
68
Reaction score
0
Points
0
Hi
I have a php scrip:
Code:
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$subject = $_POST['subject'];
$message = $_POST['message'];
$http_referrer = getenv( "HTTP_REFERER" );
$invalid = "[URL]http://warfaringwarriors.x10hosting.com/invalid.php[/URL]";
$empty = "[URL]http://warfaringwarriors.x10hosting.com/empty.php[/URL]";
$thankyou = "[URL]http://warfaringwarriors.x10hosting.com/thankyou.php[/URL]";
if(!$mail == "" && (!strstr($mail,"@") || !strstr($mail,".")))
{
header( "Location: $invalid");
exit ;
}
if(empty($name) || empty($email) || empty($subject) || empty($message)) {
header( "Location: $empty");
 exit ;
}
$from = "From: $email";
    mail( "[EMAIL="clancouncil@warfaringwarriors.x10hosting.com"]clancouncil@warfaringwarriors.x10hosting.com[/EMAIL] ", "$subject",
      "message: $message","</br>", "$from" );
header( "Location: $thankyou");
exit ;
?>
That sends email to an x10hosting emai lserver. But all the messages I get i get this error:
A message that you sent contained a recipient address that was incorrectly
constructed:

From:gohabs4ever@hotmail.com missing or malformed local part (expected word or "<")

The message has not been delivered to any recipients.

------ This is a copy of your message, including all the headers. ------


To: clancouncil@warfaringwarriors.x10hosting.com
Subject: testing
</br>

message: testetsetsetsetst
I dont the part
missing or malformed local part (expected word or "<")
Whats the problem?
 

Twinkie

Banned
Messages
1,389
Reaction score
12
Points
0
You mixed up the parameters:
PHP:
mail(to,subject,message,headers,parameters);
You should try:
PHP:
mail("clancouncil@warfaringwarriors.x10hosting.com ","$subject","message: $message","$from");
This issue belongs in the Programming-Help forum.
 
Last edited:
Status
Not open for further replies.
Top