Hello, I don't know very good PHP, I have a problem with send email. My hosting working smtp support but i didn't add it.
My function doing send recovery password. How can i add smtp support?
function sendRecover($to, $title, $url, $from, $username, $salt) {
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
$headers .= 'From: '.$title.' <'.$from.'>' . "\r\n";
$subject = 'Password Recovery - '.$title;
$message = 'A password recover was requested, if you didn\'t make this action please ignore this email. <br /><br />Your Username: <strong>'.$username.'</strong><br />Your Reset Key: <strong>'.$salt.'</strong><br /><br />You can reset your password by accessing the following link: <a href="'.$url.'/index.php?a=recover&r=1" target="_blank">'.$url.'/index.php?a=recover&r=1</a>';
return @mail($to, $subject, $message, $headers);
}