Not showing whole name with mail () script


Posted on 16th Feb 2014 07:03 pm by admin

I sent up a simple mail form with the PHP mail() script. One problem is when it sends an email with the form's contents, the From header only reads the first name and shows @domain.com in the From column.

Example:

A user inputs "John Smith" into the form as their name.

When the email arrives in my inbox it's say "John@yahoo.com", the domain name depends on which email I'm using, could say "John@hotmail.com" if I had a hotmail email address. It basically ignores the "space" and "Smith" in the name input part of the form and replaces it with "@domain.com".

How can I get it to put the whole "John Smith" instead? FYI: I'm very new to this, so not sure if this is considered an "easy fix" or not.

Thanks!

No comments posted yet

Your Answer:

Login to answer
96 Like 35 Dislike
Previous forums Next forums
Other forums

Any help with my email script?
I have an email script, I have not tested it, although someone tested it for me and said it worked f

Sufficient protection from bad input?
I am writing a simple script to let people upload 'pages' of their own content, be it simply a few b

returning data from an ssh2_exec()
here's what i got.


$conn = ssh2_connect($this->_host);
ssh2_auth_password($c

Mysterious Timeouts
I've deployed a few simple AJAX-enabled web page to a local server that is accessed through the Inte

php/mysql problem
Hey all,

Problem: im trying to setup a shop where people can use a drop-down list to select t

Select question
Hi,

First I would like to say that php is pretty new for me..
so please don't shoot me if

Encrypt php code?
Is it possible to encrypt php code in files,
so that it displays a load of unreadable characters

$_GET problem
Hi all,

Have a bit of a problem with a little piece of code, I am not sure if this should be

php form help
Hey,

I use a control file to set my meta tags and titles

Here's an example
Code: &a

Transform value 0 in no and 1 in yes help needed
Hello,
I have this in the table: "value" type int 0 to represent false and 1 to represe

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash