I intend to send an email in php and for that I prepare the variable $cuerpo
that I need to contain a link.
As seen below, I tried to do echo '<a href="https://datoweb.com">Enlace</a>'
But it has not worked.
$cuerpo= "Para confirmar su registro, por favor pulse en este". echo '<a href="https://datoweb.com">Enlace</a>';
$para=$email;
$de='[Registro Web]'.' Dni: ['.$_POST["dni"]. '] Nombre: '. $_POST["nombre"] ;
$headers = 'From: ' . "\r\n" .
'Reply-To: ' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($para,$de,$cuerpo,$headers);
Using the link of campaigner Vera Canet I have tried to send the email as a web and this way it has turned out to me, it is much more beautiful aesthetically.
$cuerpo = "Formulario de registro \n";
$cuerpo = '<html>'.
'<head><title>Registro </title></head>'.
'<body><h1>Bienvenid@ '.$nombre.'</h1>'.
'Haga click en este <a href="www.google.es"><b>Enlace</b></a> para
activar su cuenta de usuario en el privada'.
'<hr>'.
'Enviado por Grupo la Caña'.
'</body>'.
'</html>';
$para=$email;
$de='[Registro Web]'.' Dni: ['.$_POST["dni"]. '] Nombre: '.
$_POST["nombre"] ;
$headers ='Reply-To:[email protected] ' . "\r\n" .
$headers = 'From: [email protected]' . "\r\n" .
$headers = 'MIME-Version: 1.0' . "\r\n";
$headers .= 'Content-type: text/html; charset=utf-8' . "\r\n";
mail($para,$de,$cuerpo,$headers);