I've added the PHPMailer folder to my root folder on my web server and I just get an error that has to do with SMTP.
Is there a way to use PHPMailer without needing to log into a mail account? Can I just have the server send the email to a address?
I was searching this site and found this
$email = new PHPMailer();
$email->From = 'you@example.com';
$email->FromName = 'Your Name';
$email->Subject = 'Message Subject';
$email->Body = $bodytext;
$email->AddAddress( 'destinationaddress@example.com' );
$file_to_attach = 'PATH_OF_YOUR_FILE_HERE';
$email->AddAttachment( $file_to_attach , 'NameOfFile.pdf' );
return $email->Send();
But I get an error that says "Message could not be sent.Mailer Error: You must provide at least one recipient email address."