Hey I have a website and the administration panel is powered by cPanel.
I cant seem to find out why i cant send mail when using the site
I have squirrel mail installed and I have a cPanel password changer plug-in installed for squirrel mail., . here is the codeing can some tell me what im doing wrong


//--------------------------------------------------------------------User Area

$ToEmail = "mail.thirdstreetdesignstudio.com";
$ToName = "Dallas Thompson";
$ToSubject = "Thanks for your email. One of our consultants will respond to your request shortly. ";


//--------------------------------------------------------------------Prohibited Area No Changes 
$headers  = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: '.$_POST['_namex'].' <'.$_POST['_emailx'].'>' . "\r\n";

$Message = "Sender Name:".$_POST['_namex']."<br/><br/>Sender Email:".$_POST['_emailx']."<br/><br/>Sender Phone:".$_POST['_phonex']."<br/><br/>Message:".$_POST['_commx'];

    mail($ToName." <".$ToEmail.">",$ToSubject, $Message, $headers);

echo "_root.Status=success";


the server company told my i needed to have this yes, you will need to put the full email address in order to make it work and provide for the authentication also in the coding which needs the password stored somewhere and the actual server authentication addressed as well.

can someone please help im so lost

Edited by Reverend Jim: Fixed formatting

9 Years
Discussion Span
Last Post by digital-ether

I'd suggest a more simplified test:


ini_set('display_errors', '1');

mail("myemail@example.com", "test email", "test was a success", "from:myemail@example.com");


Replace myemail@example.com with your real email. If you get an email, the it is working properly.

If you get some errors or don't get an email, then you know something is wrong.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.