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

Multiple submit forms inside a mysql array page
Hi all,

Im having trouble to get the beneath script to work the thing i can't seem to get wor

session_destroy();
new to php
I have a simple login and am trying to write a logout.
I set a $_SESSION var to 1 i

Querying info from one table based on info in another
Hi, I am currently trying to make a part for my user driven website where one user can subscribe to

private constructor
Hello,

Can we create a constructor as private? If yes, what is the use of it? If no, why can'

gmmktime or mktime
I live in the UK, i am within the GMT (with daylight saving time ie 1 hour difrence between summer a

Parse error: parse error in C:wampwwwlogspagesmembers.php on line 16
I dont see the problem with this, I always get Parse error: parse error in C:wampwwwlogspagesme

problem with GROUP BY and ORDER BY
i usually use this query to display the last 10 entries from a sql table:

Code: $query = &quo

Mail from PHP form not always ending up in my inbox?
Hi guys,

I'm a real newbie to PHP and have managed to put together a simple mail form that se

How to file_get_contents when login required?
Hello!

I am trying to read data from a page that you have to be logged into to view, I am try

Navigation include for all site directories
Hi,

I need a navigation include that can deal with directories at different levels on a site.

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