I am creating a script send 10 files to different recipients daily basis. these files size upto 15 MB. The phpmailer is taking lot of time 10 to 15 min. so it become unusable to me. I am using gmail smtp.
//Server settings //$mail->SMTPDebug = SMTP::DEBUG_SERVER; // Enable verbose debug output $mail->SMTPDebug = 0; //Alternative to above constant $mail->isSMTP(); // Send using SMTP $mail->Host = 'smtp.gmail.com'; // Set the SMTP server to send through $mail->SMTPAuth = true; // Enable SMTP authentication $mail->Username = 'rmudelhi@gmail.com'; // SMTP username $mail->Password = 'rainfall2016'; // SMTP password //$mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; // Enable TLS encryption; PHPMailer::ENCRYPTION_SMTPS
encouraged $mail->SMTPSecure= 'tls'; $mail->Port = 587;