Authentication php mail
<p>i'm using mail, its working fine but now I need to use a more source mail server. The code below is what I'm using how the I add authentication to it?</p>

<p>trying to add</p>

<pre><code>smtp: "mail.newserver.com"
port: "25"
timeout: 60
auth: yes
user: name
pass: word
</code></pre>

<p>current</p>

<pre><code>$to = $SendTo;
$headers = "From: &lt;info@----&gt;" . "\r\n" . "X-Mailer: php";
$subject = "Website Contact : " . $uxGlobalLocation;
$body = $Bodycopy;

if (mail($to, $subject, $body, $headers)) {
header ('Location: /index.php?option");
exit();
} else {
echo("&lt;p&gt;Message delivery failed...&lt;/p&gt;");
}
</code></pre>
