Notifications
Clear all

Newletters....?

9 Posts
2 Users
0 Reactions
886 Views
(@secretanorak)
Posts: 11
Active Member
Topic starter
 

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.

 
Posted : 12/06/2015 12:46 pm
(@skaredcreations)
Posts: 806
Prominent Member Admin
 

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

 
Posted : 12/06/2015 12:49 pm
(@secretanorak)
Posts: 11
Active Member
Topic starter
 

This is on a 1and1 server

 
Posted : 13/06/2015 1:46 am
(@skaredcreations)
Posts: 806
Prominent Member Admin
 

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

 
Posted : 13/06/2015 4:32 am
(@skaredcreations)
Posts: 806
Prominent Member Admin
 

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:

public function prepare($subject, $body, $sTo, $sFrom = "", $sFromName = "") {
   $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

 
Posted : 15/06/2015 11:16 am
(@secretanorak)
Posts: 11
Active Member
Topic starter
 

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.

 
Posted : 20/07/2015 6:39 pm
(@skaredcreations)
Posts: 806
Prominent Member Admin
 

Try to see if it gives the error info, at line 43-44 of /admin/newsletters.php replace with this:

if ($mail->Send())
   $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

 
Posted : 20/07/2015 6:46 pm
(@secretanorak)
Posts: 11
Active Member
Topic starter
 

Log Contains:

20/07/2015 17:05:09 [INFO] Mail error: Could not instantiate mail function.

LOL. Back to square 1

 
Posted : 20/07/2015 7:06 pm
(@skaredcreations)
Posts: 806
Prominent Member Admin
 

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

 
Posted : 20/07/2015 7:17 pm
Share: