diff --git a/activation.php b/activation.php index 51867a8..04c2588 100644 --- a/activation.php +++ b/activation.php @@ -54,8 +54,8 @@ if(isset($_GET['send']) ) { $mailrcpt = $user['email']; $mailsubject = "Activate the Account of ".$user['username']; - $from = "From: Account Activation Service "; //place a real address if we use this in production - $url_activationcode = 'https://loginpagefoo.td00.de/activate.php?userid='.$user['id'].'&code='.$activationcode; //this shouldnt be my domain in prod.. + $from = "From: Account Activation Service "; //place a real address if we use this in production + $url_activationcode = 'https://'.$_SERVER['HTTP_HOST'].'/activate.php?userid='.$user['id'].'&code='.$activationcode; //this shouldnt be my domain in prod.. $text = 'Hallo '.$user['username'].', please use the following URL to activate your account in the next 24h: '.$url_activationcode.' @@ -64,7 +64,7 @@ If this mail comes unsolicited, please just ignore the mail. cheers loginpagefoo script'; - + echo $url_activationcode; mail($mailrcpt, $mailsubject, $text, $from); echo 'Link send. Going back to profile page. '; diff --git a/forgotpass.php b/forgotpass.php index 0acc354..0650999 100644 --- a/forgotpass.php +++ b/forgotpass.php @@ -47,8 +47,8 @@ if(isset($_GET['send']) ) { $mailrcpt = $user['email']; $mailsubject = "New password for your User"; - $from = "From: Password Reset Service "; //place a real address if we use this in production - $url_passwordcode = 'https://loginpagefoo.td00.de/resetpass.php?userid='.$user['id'].'&code='.$passwordcode; //this shouldnt be my domain in prod.. + $from = "From: Password Reset Service "; //place a real address if we use this in production + $url_passwordcode = 'https://'.$_SERVER['HTTP_HOST'].'/resetpass.php?userid='.$user['id'].'&code='.$passwordcode; //this shouldnt be my domain in prod.. $text = 'Hallo '.$user['username'].', please use the following URL to change your password in the next 24h: '.$url_passwordcode.' @@ -57,7 +57,7 @@ If this mail comes unsolicited, please just ignore the mail. cheers loginpagefoo script'; - + echo $url_passwordcode; mail($mailrcpt, $mailsubject, $text, $from); echo 'Link send. Going back to login page. ';