I saw the other threads on this topics, but none of the proposed solutions seems to work for me. This is my code for sending mails with attachment:
require 'PHPMailer/src/Exception.php';
require 'PHPMailer/src/PHPMailer.php';
require 'PHPMailer/src/SMTP.php';
require_once('class.phpmailer.php');
$send_mail = new PHPMailer();
$send_mail->From = "classiperlo2@altervista.org";
$send_mail->FromName = "classiperlo2";
$send_mail->Subject = "Backup";
$send_mail->Body = "Backup";
$send_mail->AddAddress("mymail@gmail.com");
$attach_file = $file;
$send_mail->AddAttachment($attach_file);
return $send_mail->Send();
I previously uploaded the folder containing PHPMaster files on the server (as downloaded from Github; the path is correct). But it doesn't work! It doesn't send any mail at all.
I really don't know what to do. Please, if you can, explain me in a simple way!
Thanks so much Giancarlo