I'm using the mail function but I do not know how to use it or if I have to activate something and as it would be in the case of being on a real server
I'm using the mail function but I do not know how to use it or if I have to activate something and as it would be in the case of being on a real server
You can use the class phpmailer.php, I pass you a piece of code that I use to send through gmail:
require_once('class.phpmailer.php');
$mail = new PHPMailer(true);
$mail->IsSMTP();
$mail->Mailer = "sendmail";
//-GMAIL
$mail->SMTPDebug = 2;
$mail->SMTPAuth = true;
$mail->SMTPSecure = "ssl";
$mail->Host = "smtp.googlemail.com";
$mail->Port = 465;
$mail->Username = "[email protected]";
$mail->Password = "laclave";
$mail->SetFrom('[email protected]', 'NombreRemitente');
$mail->MsgHTML($cuerpomail);
$mail->AddAddress("[email protected]", "Destinatario");
$mail->IsHTML(true);
$mail->Send();
$mail->ClearAddresses();
$mail->ClearAttachments();