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 10 Pro 64bit) (Wampserver 3.3.4 64bit) Aestan Tray Menu 3.2.5.4
<Apache versions MULTIPE> <PHP versions MULTIPLE> <MySQL Versions MULTIPLE>
<MariaDB versions MULTIPLE> <phpMyAdmin versions MULTIPLE> <MySQL Workbench 8.0.23>

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 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.