0

ログイン時に、ユーザーの詳細がデータベースに取り込まれますが、アカウントの有効化のための電子メールは送信されません。次のエラーが表示されます: 完了:

( ! ) Warning: mail() [<a href='function.mail'>function.mail</a>]: Failed to connect to mailserver at &quot;mail.YourDomain.com&quot; port 25, verify your &quot;SMTP&quot; and &quot;smtp_port&quot; setting in php.ini or use ini_set() in C:\wamp\www\form\index2.php on line 61
Call Stack
#   Time    Memory  Function    Location
1   0.0006  385856  {main}( )   ..\index2.php:0
2   0.0078  398648  mail ( )    ..\index2.php:61
Thank you for registering! A confirmation email has been sent to divschari@gmail.com Please click on the Activation Link to Activate your account

アカウントをアクティブ化するためのコードは次のとおりです。

    if (mysqli_affected_rows($dbc) == 1) { //If the Insert Query was successfull.

                // Send the email:
                $message = " To activate your account, please click on this link:\n\n";
                $message .=WEBSITE_URL .'activate.php?email='. urlencode($Email) . "&key=$activation";

                mail($Email, 'Registration Confirmation', $message, 'From:'.EMAIL);

                // Flush the buffered output.

                // Finish the page:
                echo '<div class="success">Thank you for
registering! A confirmation email
has been sent to ' . $Email .
                    ' Please click on the Activation Link to Activate your account </div>';

            } else { // If it did not run OK.
                echo '<div class="errormsgbox">You could not be registered due to a system
error. We apologize for any
inconvenience.</div>';
            }

        } else { // The email address is not available.
            echo '<div class="errormsgbox" >That email
address has already been registered.
</div>';
        }

php.ini への変更が行われましたが、コードのエラーは解決しません。

4

0 に答える 0