0
Colleagues.
I have a website where there are 02 forms. One for the traditional Contact Us and the other for resume submission. I am using Phpmailer. In Contact Us is working correctly, but in the other resume submission form, the following error appears: You must provide at least one recipient email address.
Follow 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?
Bingo Michelle. That’s right. About the text, thank you too. How I copied from Contact Us "Your message has been sent successfully!" I didn’t notice that ;)
– user24136