PDA

View Full Version : Sry but another php mail question



Digitalosophy
June 17th, 2003, 12:53 PM
ok first off please dont hate me for posting this question, i have searched and read and searched again, and still cannot get my content to show up in my dang emails. the email comes, but no content



<?

$Subject = "woOt";
$toEmail = "david.Collier@nan02.usace.army.mil";

$email = $_POST['email'];
$namel = $_POST['name'];


if($submit)
{
mail($email, $Subject, $message."\nFrom: ".$email_from_name."<".$email.">");
}

?>

<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body bgcolor="#ececec" text="#000000">
<p>&nbsp;</p>
<p>&nbsp;</p>
<form name="contact" action="<? echo($PHP_SELF) ?>" method="post">
<table width="461" border="0" align="center">
<tr>
<td width="88">
<div align="right"><font face="Tahoma, Arial, Verdana">Name:</font></div>
</td>
<td width="363">
<input type="text" name="name" size="25">
</td>
</tr>
<tr>
<td width="88">
<div align="right"><font face="Tahoma, Arial, Verdana">Email:</font></div>
</td>
<td width="363">
<input type="text" name="email" size="25">
</td>
</tr>
<tr>
<td width="88">
<div align="right"><font face="Tahoma, Arial, Verdana">Phone:</font></div>
</td>
<td width="363">
<input type="text" name="phone" size="25">
</td>
</tr>
<tr>
<td width="88" valign="top">
<div align="right"><font face="Tahoma, Arial, Verdana">Message:</font></div>
</td>
<td width="363" valign="top">
<textarea name="message" cols="30" rows="9"></textarea>
</td>
</tr>
<tr>
<td width="88">
<div align="right"></div>
</td>
<td width="363"><input type="submit" value="submit"></td>
</tr>
</table>
<?

echo " $name "
?>
</form>
</body>
</html>


now i do know that all the variables are not accounted for, but this is only a test to try to get at least one variables to go through in the email.

thanks boyz

Voetsjoeba
June 17th, 2003, 01:36 PM
Well, the e-mail comes so it's something with the vars. It looks ok to me but the $message."\nFrom :". part looks a bit weird to me. You have no var called $message so that might be the problem. Try putting


$message = ""; before the mail action, for example under the part where you declare vars.

If that doesn't do it, try declaring the $message var entirely before using mail() instead of adding some text to it in the mail action. That would be something like:


$message = "From : all the other stuff here"

and then use mail(stuffgoeshere, $message);

Digitalosophy
June 17th, 2003, 01:51 PM
hmm ok well the $message is the variable from the form, but i tried what u advised an no dice. any other ideas? thanks

Digitalosophy
June 17th, 2003, 01:55 PM
hey coudl it be that my file permissions are not set to write? i cant change permissions from here so im not sure if thats it

Voetsjoeba
June 17th, 2003, 02:04 PM
I don't think so, it doesn't write anything to a textfile ... It's most likely something with the $message var ... I have a working mail script, I can give it to ya if you'd want it and you can modify it to your needs.

Digitalosophy
June 17th, 2003, 02:07 PM
yes please do that would be great. however i also downloaded jubba's script and had the same issue

thanks for the help mang

Voetsjoeba
June 17th, 2003, 02:13 PM
No prob, I'll have it to ya in no time. Which e-mail address should I send it to ? Or maybe I'll post it here, so everybody can enjoy it ...

Shall I send it to @graphicsgeeks.com ?

Digitalosophy
June 17th, 2003, 02:17 PM
well yea post it here if ytou dont mind, because my job is very picky about what emails come in and from who(**** feds):)

but you can use this email

sosick@digitalosophy.com

thanks again

Voetsjoeba
June 17th, 2003, 02:26 PM
Coming up :)

Digitalosophy
June 17th, 2003, 02:32 PM
hey i finally got it to work :)

http://www.codingclick.com/article.php?page=3&aid=8

great link and thanks for all your help

Voetsjoeba
June 17th, 2003, 02:33 PM
Great :thumb: