PHP Mailer Not Instantiating the mail() function
Posted by: masaka (85.255.234.---)
Date: July 29, 2017 04:45PM

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

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

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.

Options: ReplyQuote
Re: PHP Mailer Not Instantiating the mail() function
Posted by: RiggsFolly (Moderator)
Date: July 29, 2017 07:07PM


One post per question is more than enough!

Please can you answer all these questions so we know what versions of all the possible you are using


(Windows 10 Pro 64bit) (Wampserver 3.1.3 32bit & 64bit)
<Apache 2.4.29/2.2.31> <PHP 7.2/7.1/7.0/5.6/5.5/5.4> <MySQL 5.7.19/5.6.39/5.5.28>
<MariaDB 10.2.14> <phpMyAdmin4.8.1> <MySQL Workbench 6.3.10>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin
Get your Apache/MySQL/mariaDB/PHP ADDONs here from the WAMPServer alternate Repo
-X-X-X- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -X-X-X-

Options: ReplyQuote

Sorry, only registered users may post in this forum.