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:
<?php
require 'PHPMailerAutoload.php';
$mail=new PHPMailer;
$mail->setFrom("moses_mirundi@outlook.com"winking smiley; //BRACKETS REQUIRED.
$mail->addAddress("moses_mirundi@outlook.com"winking smiley; //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.

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

Hi

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

READ (and answer) BEFORE YOU ASK A QUESTION

---------------------------------------------------------------------------------------------
(Windows 7 Pro 32bit) (Wampserver 3.0.6 32bit)
<Apache 2.4.23/2.2.31> < 7.2/PHP 7.1/7.0/5.6/5.5/5.4> <MySQL 5.7.10/5.6.17/5.5.28>
<MariaDB 10.1.21> <phpMyAdmin4.7.5> <MySQL Workbench 6.3.6.511>

Read The Manuals Apache -- MySQL -- PHP -- phpMyAdmin -- WAMPServer alternate Repo
-?-?-?- Backup your MySQL databases regularly Here is How dont regret it later! Yes even when developing -?-?-?-

Options: ReplyQuote


Sorry, only registered users may post in this forum.