Home > database >  Using codeigniter 4, cannot send link in gmail
Using codeigniter 4, cannot send link in gmail

Time:12-08

$message = "Hi ".$name.", <br>Your account is created successfully. Please click the below link to activate your account
<br><br><a href=".base_url()."/register/activate/".$uniid."Activate now </a>";

I already recieved the email but the href function is excluded. it only display "Hi myname, Your account is created successfully. Please click the below link to activate your account";

it dont display the link

CodePudding user response:

You have syntax errors in your code.

  1. Missing > in anchor tag".$uniid."Activate now
  2. Wrong href dicleration href=".base_url()."/register/activate/".$uniid."
  3. wrap inner conditions with '.

Use below code

$message = "Hi {$name}, <br>Your account is created successfully. Please click the below link to activate your account
<br><br><a href='/register/activate/{$uniid}'>Activate now </a>";
  • Related