# Why does this happen

**URL:** <https://forum.kirupa.com/t/why-does-this-happen/18486>\
**Category:** programming\
**Created:** [April 17, 2003, 2:59am UTC](https://forum.kirupa.com/t/why-does-this-happen/18486 "2003-04-17T02:59:20Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![nobody](https://avatars.discourse-cdn.com/v4/letter/n/94ad74/32.png) [@nobody](https://forum.kirupa.com/u/nobody)\
**Post date:** [April 17, 2003, 2:59am UTC](https://forum.kirupa.com/t/why-does-this-happen/18486/1 "2003-04-17T02:59:20Z")

</div>

I have a mailer doohicky… and I just curious as to why something happens…

```php
<?

// Mail out
$f = "From : ";
$From = $f . $email;
mail("5852611864@vtext.com", $subject, $message, $From);

?>

```

That code doesn’t send the e-mail address

```php
<?

// Mail out
$f = "$From : ";
$From = $f . $email;
mail("5852611864@vtext.com", $subject, $message, $From);

?>

```

That one does… any clue why

also… is there a way to make it so when the user inputs their email address it actually shows up as coming from there?

---

<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:** [April 18, 2003, 5:17pm UTC](https://forum.kirupa.com/t/why-does-this-happen/18486/2 "2003-04-18T17:17:40Z")

</div>

bizump

---

<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:** [April 18, 2003, 5:44pm UTC](https://forum.kirupa.com/t/why-does-this-happen/18486/3 "2003-04-18T17:44:51Z")

</div>

There are absolutely no differences between the code, are you sure you posted the right two versions?

---

<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:** [April 18, 2003, 5:57pm UTC](https://forum.kirupa.com/t/why-does-this-happen/18486/4 "2003-04-18T17:57:32Z")

</div>

difference is the “$” in $From  
in 1st case, you just send the word,  
in the second ($From ) the value of that php variable…

---

<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:** [April 18, 2003, 6:01pm UTC](https://forum.kirupa.com/t/why-does-this-happen/18486/5 "2003-04-18T18:01:05Z")

</div>

Ohhh… man, I went through that over and over and over… and NEVER noticed that. Good eye Eyez… 😛

---

<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:** [April 18, 2003, 6:09pm UTC](https://forum.kirupa.com/t/why-does-this-happen/18486/6 "2003-04-18T18:09:23Z")

</div>

Yup, eyez founded it.  
So it’s just because the one was a word, and the other was a variable?

---

<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:** [April 18, 2003, 9:11pm UTC](https://forum.kirupa.com/t/why-does-this-happen/18486/7 "2003-04-18T21:11:54Z")

</div>

Yeah

---

<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:** [April 19, 2003, 12:48am UTC](https://forum.kirupa.com/t/why-does-this-happen/18486/8 "2003-04-19T00:48:50Z")

</div>

oh… well it still doesn’t do what its supposed to, but its closer

---

<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:** [April 19, 2003, 1:01am UTC](https://forum.kirupa.com/t/why-does-this-happen/18486/9 "2003-04-19T01:01:00Z")

</div>

what exactly are you trying to do? I’m a little unclear as to what you want… its not sending the e-mail at all? or its just not saying what the From field is?

---

<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:** [April 19, 2003, 1:37am UTC](https://forum.kirupa.com/t/why-does-this-happen/18486/10 "2003-04-19T01:37:29Z")

</div>

Jubba:  
It is sending the email, the subject and the actual message part show up, but what happens is that it comes from [host33@ipowerweb.com](mailto:host33@ipowerweb.com), not from the inputed emaiil, and I’m wondering if there is a way to have it show up like that or if its ubpossible

---

<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:** [April 19, 2003, 1:52am UTC](https://forum.kirupa.com/t/why-does-this-happen/18486/11 "2003-04-19T01:52:55Z")

</div>

yeah, did you read all of my post here: [http://www.kirupaforum.com/forums/showthread.php?s=&threadid=17313](http://www.kirupaforum.com/forums/showthread.php?s=&threadid=17313)

it explains the header information in the 7th post down…

---

<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:** [April 19, 2003, 2:06am UTC](https://forum.kirupa.com/t/why-does-this-happen/18486/12 "2003-04-19T02:06:44Z")

</div>

Jubba, I read it, but I’m still lost  
Like, I can make the name show up, just not in the right place…  
and i don’t really need the bcc thing if thats what you thought i meant… sorry for bein annoying

---

<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:** [April 19, 2003, 2:07am UTC](https://forum.kirupa.com/t/why-does-this-happen/18486/13 "2003-04-19T02:07:45Z")

</div>

no not the bcc thing. it tells you how to put the From: part in.

---

<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:** [April 19, 2003, 2:09am UTC](https://forum.kirupa.com/t/why-does-this-happen/18486/14 "2003-04-19T02:09:42Z")

</div>

Ok, well I’m gonna do what I can, I’ll post what I’ve done to further screw up my thing in a minute. :beam:

---

<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:** [April 19, 2003, 2:10am UTC](https://forum.kirupa.com/t/why-does-this-happen/18486/15 "2003-04-19T02:10:41Z")

</div>

```php
$headers = "From: $fromName <$fromName@$SERVER_NAME> 
";

```

isnt that just gonna make it be from the person’s name at [xxviii.net](http://xxviii.net)? ([xxviii.net](http://xxviii.net) being my server thing)

---

<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:** [April 19, 2003, 2:11am UTC](https://forum.kirupa.com/t/why-does-this-happen/18486/16 "2003-04-19T02:11:18Z")

</div>

you can make it say wherever you want. just change the varialbes.

---

<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:** [April 19, 2003, 2:12am UTC](https://forum.kirupa.com/t/why-does-this-happen/18486/17 "2003-04-19T02:12:58Z")

</div>

ok, just a minute, ill try real quick

---

<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:** [April 19, 2003, 2:16am UTC](https://forum.kirupa.com/t/why-does-this-happen/18486/18 "2003-04-19T02:16:33Z")

</div>

I just realized something  
isnt

```php
$headers = "From: $fromName <$fromName@$SERVER_NAME> 
";

```

just going to place From: [Whoever@whatever.com](mailto:Whoever@whatever.com) at the top or wherever?  
I want the inputed email address to actually be the email address you recieved from

---

<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:** [April 19, 2003, 2:18am UTC](https://forum.kirupa.com/t/why-does-this-happen/18486/19 "2003-04-19T02:18:07Z")

</div>

oh, then check out the link in that thread. There is a complete explanation of headers in there…

---

<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:** [April 19, 2003, 2:18am UTC](https://forum.kirupa.com/t/why-does-this-happen/18486/20 "2003-04-19T02:18:42Z")

</div>

check out Replay-to

[Next page](https://forum.kirupa.com/t/why-does-this-happen/18486.md?page=2)
