PHP mail only showing first word of from name

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

DEFINE ('EMAIL_HEADER', 'From: Our World' . "\r\n" . 'Reply-To:' . "\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

    The from field should look like:

    "From:Our World<>"

    Author Closing Comment

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

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Easy Project Management (No User Manual Required)

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Suggested Solutions

    Introduction Many web sites contain image galleries; a common design for these galleries includes a page with a collection of thumbnail images.  You can click on each of the thumbnail images to see the larger version of the image.  This is easily i…
    Generating table dynamically is the most common issue faced by php developers.... So it seems there is a need of an article that explains the basic concept of generating tables dynamically. It just requires a basic knowledge of html and little maths…
    The viewer will learn how to dynamically set the form action using jQuery.
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    737 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

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now