In my program i need to send mail if the registration is success.
in my file the total data is successfully inserted in the database
but mail was not sent to the particular person.
$from = '
[email protected]';
$subject = 'Activate your WLO trial account';
$reply = "<a href=\"http://wloconnect.com/site/activate_trial/index.php?userName='.$email.'&passWORD='.$random_password.'\">Click To Activate your WLO Trial Account>";
$msg = "\r\n\r\nThank you $firstName for signing up for a trial account with WLO. Your trial account gives you access to our rate sheets and guidelines. This account will remain active for 30 days. \r\n\r\nYour login and password are \r\n\r\nLogin: $email \r\n\r\nPassword: $random_password \r\n\r\nYou must click the link below to activate your account \r\n\r\nhttp://wloconnect.com/site/activate_trial/index.php?userName=$email&passWORD=$db_password \r\n\r\nThis is an auto-generated Message. Please do not reply to this email.";
// Send the message
$ok = @mail($email, $subject, $msg, "From: <$from>");
if ($ok) {
echo '
<br>
<p class="table2ndBodyCopy">
Thank you for signing up for a trial account with WLOconnect.com.
</p>
<p class="table2ndBodyCopy">
You will recieve a email shortly with your new login name and your password.
</p>
<p class="table2ndBodyCopy">
<b>You must click on the link in the email to activate your trial account.</b>
</p>
<br>
';
}
else {
echo '
<br>
<p class="table2ndBodyCopyError">
Temporarily unable to create account!
</p>
<br>
';
}
Here i am directly go to else part.
please give the solution.
for sending the mail we need any changes in the apache (httpd.conf) and php.ini files.
No one has replied yet! Why not be the first?
Sign in or Join us (it's free).