troubleshooting Question

How can I make this email script look better?

Avatar of Bruce Gust
Bruce GustFlag for United States of America asked on
6 Comments1 Solution270 ViewsLast Modified:
Here's the script (and it works great):

$to = $email;
$subject = $subject_line;
$from = $from_email;
$message .= "To view the credibility index for $student_name, either click on the link below or copy and paste it into your browser.";
$message .= "<P>$the_id</a>.<P>Thanks!";
if (mail($to, $from, $subject, $message, $headers)) {
echo("<p>Yeah, baby!</p>");
} else {
echo("<p>Message delivery failed...</p>");

Here's the way that it show up in my inbox - not the way that the body of the text looks, this is the way that it's listed:

Instead of:
Credibility index for Bruce Gust says:


How can I get my subject to precede my "from" address and eliminate the "www-data" thing?
Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 6 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros