Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

By garson
I am trying to send outgoing emails from my PHP app. Here is the error I get:
“Fatal error: Class ‘PHPMailer’ not found in /usr/share/nginx/templates/webapp.php”
And here is my PHP code for sending the mail, with the require commented out:
//require ( ‘class.phpmailer.php’);
$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = “mail.yourdomain.com”; // SMTP server
$mail->SMTPDebug = 0; // enables SMTP debug information (for testing)
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->SMTPSecure = “tls”; // sets the prefix to the servier
$mail->Host = “smtp.gmail.com”; // sets GMAIL as the SMTP server
$mail->Port = 587; // set the SMTP port for the GMAIL server
<etc…>
$mail -> isHTML(true); // ALLOWS HTML EMAIL FORMATTING
$mail-> Subject = $emailsubject ;
$mail -> Body = $emailbody ;
if ($mail->Send() == false )
{
die($mail->ErrInfo) ;
}
When I include the ‘require’ statement, I get the following error:
Warning: require(class.phpmailer.php): failed to open stream: No such file or directory in /usr/share/nginx/templates/webapp.php
Help? Thanks!!