Hi, i'm writing this because i'm thinking in cut my veins with a lettuce leaf, I have passed weeks and weeks trying to change the way scripts send php mail in order to be sent trough authenticated smtp and i don't find the way.
I've tried php mailer, smtp.class, and a lot of scripts found in google and nothing; I don't know if anyone here can help me.
The next is a code of a script, when a user register itself, it's suposed to receive a confirmation mail... but of course, nothing happens because uses the php mail function.
If any body can help me I'll be very thankful.
Ado
I've tried php mailer, smtp.class, and a lot of scripts found in google and nothing; I don't know if anyone here can help me.
The next is a code of a script, when a user register itself, it's suposed to receive a confirmation mail... but of course, nothing happens because uses the php mail function.
PHP Code:
<?
$result = mysql_query("SELECT * FROM $membtable WHERE m_user='$en[user]' OR m_email='$en[email]' LIMIT 1") or die(mysql_error());
$line = mysql_fetch_assoc($result);
if (mysql_num_rows($result) == 0) {
$en['send_result'] = _sent_code_fail;
} else {
$temp = '';
for ($k = 1;$k<=7;$k++)
$temp .= chr(97+rand(0,25));
$en = array_merge($line,$en);
$en['pass'] = $temp;
$mail = emailtemplate('emails/send_password.tpl');
mail($line[m_email], $mail[subj], $mail[body],
"From: ".admin_email."\r\n"
."Reply-To: ".admin_email."\r\n"
."X-Mailer: PHP/" . phpversion());
mysql_query("UPDATE $membtable SET m_pass='".md5($temp)."' WHERE m_id=$line[m_id]") or die(mysql_error());
$en['send_result'] = _pass_sent.' <b>'.$line[m_email].'</b>';
}
load_template(tpl_path.'password_sent.tpl');
?>
Ado
Comment