[Last Call] Learn how to a build a cloud-first strategyRegister Now


PHP mail only showing first word of from name

Posted on 2012-08-20
Medium Priority
Last Modified: 2012-08-20
I have this for:

DEFINE ('EMAIL_HEADER', 'From: Our World noreply@xxxxx.com' . "\r\n" . 'Reply-To: info@xxxxx.com' . "\r\n" . 'X-Mailer: PHP/' . phpversion());

Open in new window

For this:

$sent = mail($current_email, 'xxxxx xxxxx Account Activated', $body, EMAIL_HEADER);

Open in new window

But the from is only show from Our, if I put it in quotes it shows as  "Our World".

Can you see what I'm doing wrong?  I just want it to be from Our World
Question by:christamcc
LVL 16

Accepted Solution

grahamnonweiler earned 2000 total points
ID: 38313280
The from field should look like:

"From:Our World<noreply@xxxxx.com>"

Author Closing Comment

ID: 38313360
ahh, the angle brackets! how could i forget the angel brackets!?  thanks!

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to count occurrences of each item in an array.
Suggested Courses
Course of the Month17 days, 21 hours left to enroll

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question