testing email verification for registration locally

Hi

i have followed a tutorial for registering users that sends an email to their account so that they may verify before being registered. in this part below the variable $server is confusing to me. the guy who did the tutorial used this in his “$server” variable but i dont know what that is or what to use in my case i fi am testing locally.

[php] $to = $email;
$subject = “Activate your account!”;
$headers = “From: [email protected]”;
$server = “mailhost.sheffield.ac.uk”;
ini_set(“SMTP”, $server);
$body = “Hello $fullname,\n\nYou registered and need to activate your account.
Click the link below or paste it into the URL bar of
your browser\n\nhttp://localhost/registerlogin/activate.php?id=$lastid&code=$random\n\nThanks!”;
//function to send email
mail($to, $subject, $body, $headers);
die (“You have been registered, check your email to activate your account”);
}[/php]

If testing locally, you would use 127.0.0.1 or localhost:

[php]$server = ‘localhost’;[/php]

Sponsor our Newsletter | Privacy Policy | Terms of Service