Fatal error: require(): Failed opening required 'phpmailer/class.phpmailer.php'
<?php require('phpmailer/class.phpmailer.php'); require '../vendor/phpmailer/phpmailer/autoload.php'; $mail = new PHPMailer(); $mail->IsSMTP(); $mail->SMTPDebug = 0; $mail->SMTPAuth = TRUE; $mail->SMTPSecure = PHPMailer::ENCRYPTION_STARTTLS; $mail->Port = 587; $mail->Username = "ggcobani@gmail.com"; $mail->Password = "861026@Metro"; $mail->Host = "smtp.gmail.com"; $mail->Mailer = "smtp"; $mail->SetFrom($_POST["userEmail"], $_POST["userName"]); $mail->AddReplyTo($_POST["userEmail"], $_POST["userName"]); $mail->AddAddress("RECIPIENT_EMAIL"); $mail->Subject = $_POST["subject"]; $mail->WordWrap = 80; $mail->MsgHTML($_POST["content"]); $mail->Body = $mail_body; // sending multiple attachment $fileNameArray = array($file1Name, $file2Name, $file3Name); $filePathArray = array($file1Path, $file2Path, file3Path); // . . . for($i = 0; $i < 3; $i++) { $mail->addAttachment($fileDataArray[$i], $fileNameArray[$i]); } $mail->Send(); $mail->IsHTML(true); if(!$mail->Send()) { echo "<p class='error'>Problem in Sending Mail.</p>"; } else { echo "<p class='success'>Mail Sent Successfully.</p>"; } ?>
$mail->SetFrom($_POST["userEmail"], $_POST["userName"]);
setFrom
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)