Hi My name is Rick I am trying to change the default server mail default with, PHPMailer with no luck, but it does work on a page by itelf, I am trying to replace this below, which is inside a function, and when I add the phpmailer code I get errors, can someone let me how to use this along with global variables? I could really use the help PHPMailer seems way better then default. once I get this, and understand it a bit more, I will replace the default in all php scripts. @mail($email, $sub, $msg, GetConfig('msgheaders')); works PHP: I need to find a way to use PHPMailer inside a function like above $mail = new PHPMailer(); //works by itself on another page $mail->IsSMTP(); // set mailer to use SMTP $mail->Host = "relay-hosting.secureserver.net"; // specify main and backup server $mail->SMTPAuth = false; // turn on SMTP authentication $mail->Username = "username"; // SMTP username $mail->Password = "password"; // SMTP password $mail->From = "test1@gmail.com"; $mail->FromName = "Testing PHPMailer"; $mail->AddAddress("test@gmail.com"); $mail->IsHTML(true); $mail->Subject = "Test message body"; $mail->Body = "Test <b>html</b>"; $mail->AltBody = "Test Text"; if(!$mail->Send()) PHP: