Hello all,   I am usually not so nice as to post things of this nature, but since I have bruises (exaggeration) on my knuckles from punching the walls earlier, I figured I'd go ahead and share. As much as I'd love to package this up and "contribute", I am in the middle of a big project. If anyone wants to do this, feel free to do it and credit yourself as I am only doing this so noone else considers suicide over this crap (kidding).   Basically, a huge problem arrises with the php function "mail" if your server requires SMTP authentication. Tell tale sign of this, is the ability for you to send mail to your domain or any domain on the server (if virtual).   While, I found a contribution that was supposed to address this, I could not get to work. So I said screw it, and went with what I know works and have had to use in my other scripts. A script is circulating the internet dubbed sock_mail.php which bascially uses pear(?) to open an actual SMTP connection. This function supports authentication.   So what I did was scrap the whole email class and modified the tep_mail function to gather and restructure the incoming data and pass it to sock_mail. Simple enough - here is the code. Keep in mind, I just did this, so there could be potential issues which I would be very grateful if someone would point out now.   These instructions are for /includes/functions/general.php only - you will probably need to do the same general.php under /admin   Anyway, open /includes/functions/general.php.   Before the tep_mail function insert (configure the variables located at the top of this function to match your configuration (username/pass)):   function sock_mail($auth,$to, $subj, $body, $head, $from){       $lb="\r\n";                        //linebreak       $body_lb="\r\n";                //body linebreak       $loc_host = "localhost";        //localhost       $smtp_acc = "username";        //account       $smtp_pass="password";            //password       $smtp_host="localhost";    //server SMTP       #$hdr = explode($lb,$head);        //header             if($body) {$bdy = preg_replace("/^\./","..",explode($body_lb,$body));}             // build the array for the SMTP dialog. Line content is array(command, success code, additonal error message)       if($auth == 1){// SMTP authentication methode AUTH LOGIN, use extended HELO "EHLO"           $smtp = array(               // call the server and tell the name of your local host               array("EHLO ".$loc_host.$lb,"220,250","HELO error: "),               // request to auth               array("AUTH LOGIN".$lb,"334","AUTH error:"),               // username               array(base64_encode($smtp_acc).$lb,"334","AUTHENTIFICATION error : "),               // password               array(base64_encode($smtp_pass).$lb,"235","AUTHENTIFICATION error : "));       }       else {// no authentication, use standard HELO               $smtp = array(               // call the server and tell the name of your local host               array("HELO ".$loc_host.$lb,"220,250","HELO error: "));       }               // envelop       $smtp[] = array("MAIL FROM: <".$from.">".$lb,"250","MAIL FROM error: ");       $smtp[] = array("RCPT TO: <".$to.">".$lb,"250","RCPT TO error: ");       // begin data               $smtp[] = array("DATA".$lb,"354","DATA error: ");       // header       $smtp[] = array("Subject: ".$subj.$lb,"","");       $smtp[] = array("To:".$to.$lb,"","");               foreach($head as $h) {$smtp[] = array($h.$lb,"","");}       // end header, begin the body       $smtp[] = array($lb,"","");       if($bdy) {foreach($bdy as $b) {$smtp[] = array($b.$body_lb,"","");}}       // end of message       $smtp[] = array(".".$lb,"250","DATA(end)error: ");       $smtp[] = array("QUIT".$lb,"221","QUIT error: ");       // open socket       $fp = @fsockopen($smtp_host, 25);       if (!$fp) echo "<b>Error:</b> Cannot conect to ".$smtp_host."<br>";             $banner = @fgets($fp, 1024);       // perform the SMTP dialog with all lines of the list       foreach($smtp as $req){           $r = $req[0];           // send request           @fputs($fp, $req[0]);           // get available server messages and stop on errors           if($req[1]){               while($result = @fgets($fp, 1024)){if(substr($result,3,1) == " ") { break; }};               if (!strstr($req[1],substr($result,0,3))) echo"$req[2].$result<br>";           }       }       $result = @fgets($fp, 1024);       // close socket       @fclose($fp);       return 1;   }     Next, scrap the whole tep_mail function and replace with :    function tep_mail($to_name, $to_email_address, $email_subject, $email_text, $from_email_name, $from_email_address) {    $headers[0]='MIME-Version: 1.0'; $headers[1]='Content-type: text/html; charset=iso-8859-1'; $headers[2]='From: '.$from_email_name.'<'.$from_email_address.'>'; $from = $from_email_address; $subject = $email_subject; $catre = $to_email_address; $email_text = str_replace("\n", "<br>", $email_text); sock_mail(1,$catre,$subject,$email_text,$headers,$from);    }   Finally, verify that your email settings in the admin panel are as follows:   E-Mail Transport Method: smtp E-Mail Linefeeds: CRLF Use MIME HTML When Sending Emails: true Verify E-Mail Addresses Through DNS: false Send E-Mails: true   There you go, problem solved - you should be able to send mail without an issue now. Or this will at least be a good starting point for you.