My smtp server now requires authentication. I have an existing mail script but I have no idea how to add the authentication.
var $mailprog="/usr/sbin/sendmail -t";
...
$sm=popen("$CFG->mailprog","w");
fputs($sm,"To: $email\n");
fputs($sm,"From: $CFG->admin_email\n");
fputs($sm,"Reply-to...