# Sry but another php mail question

**URL:** <https://forum.kirupa.com/t/sry-but-another-php-mail-question/23402>\
**Category:** programming\
**Created:** [June 17, 2003, 3:53pm UTC](https://forum.kirupa.com/t/sry-but-another-php-mail-question/23402 "2003-06-17T15:53:41Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 17, 2003, 3:53pm UTC](https://forum.kirupa.com/t/sry-but-another-php-mail-question/23402/1 "2003-06-17T15:53:41Z")

</div>

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

```php

<?

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

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

if($submit)
{
mail($email, $Subject, $message."
From: ".$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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 17, 2003, 4:36pm UTC](https://forum.kirupa.com/t/sry-but-another-php-mail-question/23402/2 "2003-06-17T16:36:35Z")

</div>

Well, the e-mail comes so it’s something with the vars. It looks ok to me but the $message."  
From :". part looks a bit weird to me. You have no var called $message so that might be the problem. Try putting

```php
$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:

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

```

and then use mail(stuffgoeshere, $message);

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 17, 2003, 4:51pm UTC](https://forum.kirupa.com/t/sry-but-another-php-mail-question/23402/3 "2003-06-17T16:51:28Z")

</div>

hmm ok well the $message is the variable from the form, but i tried what u advised an no dice. any other ideas? thanks

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 17, 2003, 4:55pm UTC](https://forum.kirupa.com/t/sry-but-another-php-mail-question/23402/4 "2003-06-17T16:55:47Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 17, 2003, 5:04pm UTC](https://forum.kirupa.com/t/sry-but-another-php-mail-question/23402/5 "2003-06-17T17:04:07Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 17, 2003, 5:07pm UTC](https://forum.kirupa.com/t/sry-but-another-php-mail-question/23402/6 "2003-06-17T17:07:42Z")

</div>

yes please do that would be great. however i also downloaded jubba’s script and had the same issue

thanks for the help mang

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 17, 2003, 5:13pm UTC](https://forum.kirupa.com/t/sry-but-another-php-mail-question/23402/7 "2003-06-17T17:13:06Z")

</div>

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 …

[EDIT] Shall I send it to @graphicsgeeks.com ? [/EDIT]

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 17, 2003, 5:17pm UTC](https://forum.kirupa.com/t/sry-but-another-php-mail-question/23402/8 "2003-06-17T17:17:52Z")

</div>

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](mailto:sosick@digitalosophy.com)

thanks again

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 17, 2003, 5:26pm UTC](https://forum.kirupa.com/t/sry-but-another-php-mail-question/23402/9 "2003-06-17T17:26:15Z")

</div>

Coming up 🙂

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 17, 2003, 5:32pm UTC](https://forum.kirupa.com/t/sry-but-another-php-mail-question/23402/10 "2003-06-17T17:32:22Z")

</div>

hey i finally got it to work 🙂

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

great link and thanks for all your help

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [June 17, 2003, 5:33pm UTC](https://forum.kirupa.com/t/sry-but-another-php-mail-question/23402/11 "2003-06-17T17:33:36Z")

</div>

Great :thumb:
