Hi,
I've been trying out the newsletter but can't get it to work and can't find any documentation on it.
When I try to send a newsletter I get: ERROR Could not instantiate mail function.
Any help would be appreciated.
Are you trying this on your local machine or on a production server? Usually the mail server is not installed on local machines, though it should work on production server.
FRANCESCO CROCETTI @ SKARED CREATIONS
This is on a 1and1 server
I'm away for the weekend, at Monday we can get in contact and catch the issue on your server if you'll be available on Skype for quick messaging.
FRANCESCO CROCETTI @ SKARED CREATIONS
Please try this: open the web file /lib/Mail.php, comment the function prepare (enclose it within /* and */, like in C#) and paste this right after it:
$this->reset();
if (!$body || !$sTo)
return false;
$this->AddAddress($sTo);
if ($sFrom)
$this->SetFrom($sFrom, $sFromName);
$this->Subject = $subject;
$this->body = $body;
$this->AltBody = strip_tags($body);
return true;
}
Then retry to send the newsletter.
FRANCESCO CROCETTI @ SKARED CREATIONS
Sorry for my very late response, but I've tried your above solution in 2.0.6 and still no joy.
Are there any known issues with this host? (1and1)
I can get my own php mailer code working, it just seems a shame to have to bypass combu.
Any help would be appreciated.
Try to see if it gives the error info, at line 43-44 of /admin/newsletters.php replace with this:
$testsent = "1";
else
AppLog::Info ("Mail error: " . $mail->ErrorInfo);
It should log something in the log file (as defined in config.php).
FRANCESCO CROCETTI @ SKARED CREATIONS
Log Contains:
20/07/2015 17:05:09 [INFO] Mail error: Could not instantiate mail function.
LOL. Back to square 1
Well I don't know what's happening there for your domain, PhpMailer usually works on any provider. If you have a working code to send mail you can use yours in the function Send of /lib/Mail.php (in the function you can use the following properties of $this: From, FromName, Subject, body and eventually AltBody).
FRANCESCO CROCETTI @ SKARED CREATIONS