Colleagues.
I have a site where I have 02 forms. One for the traditional Contact Us and the other for sending resume. I'm using PHPMailer. No Contact Us is working properly, however in the other resume submission form, the following error appears: You must provide at least one email address.
The following is the code below:
include("includes/class.phpmailer.php");
$mail = new PHPMailer();
$mail->From = "[email protected]";
$mail->FromName = "Currículo";
$mail->AddAddress("[email protected]");
$mail->IsHTML(true);
$mail->AddAttachment($curriculo['tmp_name'],$curriculo['name']);
$data = date("d/m/Y");
$hora = date("H:i");
$mensagemHTML = "mensagem";
$mail->Subject = "Vaga enviada pelo site";
$mail->Body = $mensagemHTML;
$mail->ClearAllRecipients();
$mail->ClearAttachments();
if($mail->Send()){
$mensagem = 'Seu curriculo foi enviada com sucesso!';
}else{
$mensagem = "Erro ao enviar. Se o erro persistir, entre em contato conosco!";
}
The directory is correct, just like the email. Would anyone know why this error occurred?