Quantcast
Channel: WampServer - WampServer English
Viewing all articles
Browse latest Browse all 3177

PHP Mailer Not Instantiating the mail() function (1 reply)

$
0
0
I have run the following script:
<?php
require 'PHPMailerAutoload.php';
$mail=new PHPMailer;
$mail->setFrom("moses_mirundi@outlook.com"); //BRACKETS REQUIRED.
$mail->addAddress("moses_mirundi@outlook.com"); //BRACKETS are REQUIRED.
$mail->Subject="Learn About PHPMailer";
$mail->Body="Hello fellow, are you enjoying the lovely summer weather ?";

if(!$mail->send()){
echo "Your message has not been sent. <br>";
echo "Mail error : ".$mail->ErrorInfo;
} else {
echo " Congratulations!!. Your message has been sent. Lucky fella!";
}


When I run this script, I get the following error message telling me
that the PHPMailer class could not be instantiated at line 2 in the script above.

Your message has not been sent.
Mail error : Could not instantiate mail function.
I am using Wampserver64 and I have the following files in the same folder as the one I am writing the script to send the emails
class.phpmailer.php
class.smtp.php
PHPMailerAutoload.php

My wampserver does not have a resident php_smtp module. I need help on where I could download and install it into my wampserver.I have tried Google but without any luck.

Viewing all articles
Browse latest Browse all 3177

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>