Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
mail function problem ( linux , godaddy )
Old 01-14-2009, 03:02 AM mail function problem ( linux , godaddy )
Skilled Talker

Posts: 97
Trades: 0
in this php code the data is posted from a form and will be mailed to my e-mail
but my problem is that when Using the php mail function with godaddy , i did not receive the mail
the system is linux

and for more details for phpinfo click on the following link
http://projects.kayandco-egypt.com/untitled2_old.php
really i need help to fix this problem today.....
i tried to see many forums but i dont have the solutions yet
i tried also to use phpmailer but it did not help me
if anyone have a function or any solution for this problem plz send for me
PHP Code:
<?
session_start
();
header("Cache-control: private"); // IE 6 Fix
if ($_POST["name"])
{
 

foreach (
$_POST as $key => $value) {
$
$key trim($value);
$_SESSION[$key "_b"] = $value;
// echo "Key: $key; Value: $value<br />\n";
}
$kind "mail";
 

$messageo '
<html>
<head>
<style>
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 11px;
color: #737373;
text-align: justify;
width: auto;
margin-right: 0px;
margin-left: 0px;
margin-top: 10px;
margin-bottom: 10px;
line-height: 17px;
}
.padding {
padding-left: 30px;
background-color: #cdcdcd;
color: #023061;
height: 30px;
vertical-align: middle;
}
.padding2 {
padding-left: 30px;
background-color: #E5E5E5;
color: #023061;
height: 30px;
}
.title1 {
font-size: 17px;
font-weight: bold;
color: #023061;
padding-top: 20px;
padding-bottom: 25px;
font-family: Arial, Helvetica, sans-serif;
text-transform: uppercase;
}
</style>
</head>
<body>
<div class="title1" align="center">mail</div>
<table width="50%" border="0" cellspacing="1" cellpadding="4" align="center">
<tr class="padding">
<td width="30%"><strong>Name <b></strong> </td>
<td >' 
$name '</td>
</tr>
<tr class="padding2">
<td ><strong>E-mail </strong> </td>
<td >' 
$emal '</td>
</tr>
 
<tr class="padding">
<td><strong> City </strong> </td>
<td>' 
.$city '</td>
</tr>
<tr class="padding2">
<td><strong>Country</strong> </td>
<td>'
.$country.'</td>
</tr>
<tr class="padding">
<td><strong>Telephone</strong> </td>
<td>' 
$tel.'</td>
</tr>
</table> 
</body>
</html> '
;
 
//echo $message;
 
$headers .= "MIME-Version: 1.0\r\n"
$headers .= "Content-type: text/html; charset=windows-1256\r\n";
$headers .= "From: info@abcc.com>\r\n";
$headers .= "cc: abc@abc.com\r\n";

$ok mail("abc@abc.com"$kind$messageo$headers); 

}
header("Location: welcome.php"); 
?>
john_zakaria is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-14-2009, 03:21 AM Re: mail function problem ( linux , godaddy )
tripy's Avatar
Do not try this at home!

Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
Trades: 0
I see just one thing:
PHP Code:
$headers .= "From: info@abcc.com>\r\n"
You have a stale ">" in there.
The php manual says that
Quote:
When sending mail, the mail must contain a From header.
So maybe it's this that causes the error.
__________________
Only a biker knows why a dog sticks his head out the window.
tripy is offline
Reply With Quote
View Public Profile Visit tripy's homepage!
 
Reply     « Reply to mail function problem ( linux , godaddy )
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.11086 seconds with 12 queries