função mail
To tendo uma certo dificuldade com a função mail.... ta dando esse erro:
Warning: mail() expects at most 5 parameters, 6 given in /home/imo/public_html/emailteste/index.php on line 28
Esse é o codigo
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<body>
<form method="post" enctype="multipart/form-data">
Nome: <input type="text" name="nome"/> <br /><br />
Assunto: <input type="text" name="assunto" /><br /><br />
Telefone: <input type="tel" name="telefone" /><br /><BR />
Email: <input type="text" name="email" /><br /><br />
Mensagem: <textarea name="texto"> </textarea><br /><br />
<input type="submit" name="acao" value="Enviar" />
</form>
<?php
if(isset($_POST['acao']) && $_POST['acao'] == 'Enviar'){
$nome2 =$_POST['nome'];
$assunto2 ="Assunto" . $_POST['assunto'];
$tel = "Telefone" . $_POST['telefone'];
$email2 ="Email:". $_POST['email'];
$msg = "Mensagem"; $_POST['texto'];
if(!empty($nome2) && !empty($assunto2) && !empty($tel) && !empty($email2) && !empty($msg)) {
$msg = wordwrap($msg, 70,"<br>", true);
mail ("zeemilio11@gmail.com",$nome2,$assunto2,$tel,$email2,$msg);
//echo '<script> alert("Sua mensagem foi enviada, em breve entraremos em contato com você!");</script>';
// mail("zeemilio11@gmail.com", $assunto2, $msg);
}else{
echo '<script> alert("Preencha todos os campos");</script>';
}
}
?>
</body>
</html>
Alguém, pode ajudar?
Att,
Discussão (4)
Carregando comentários...