Jump to content

Newsletter failures & sending to subset of list


Nelly111s

Recommended Posts

I'm on Cubecart 6.5.1 / php 8.1. I have about 1500 people subscribed to the newsletter. I've tried sending it, but the routine doesn't seem to get to the end and just hangs at "Cancel send" screen.

I've looked in the email log and the "CubeCart_email_log" table in the dB and there are quite a few entries which say that they're not sent, with "Could not instantiate mail function" as an error. I assume that the ones with no error have sent OK.

 

Firstly, anyone know what is causing this error

Secondly, is there any way of sending to the people who are in the "error" category. I can easily get that list via SQL from the dB (maybe even create a new table), but how do I get the routine to use this subset?

 

Thanks

Link to comment
Share on other sites

Please look in CubeCart's System Error Log for any entries that might pertain to the sending of emails.

You may have set CubeCart to use the mail() function in admin, Store Settings, Advanced tab.

"Could not instantiate mail function." comes from the PHPMailer library, when it wants to use whatever email service that PHP is told is available on the server - Exim, Sendmail, Qmail, whatever - but that this service has reported it cannot be used. This may be because the amount of emails has hit a limit according to the settings of that email service: quantity per batch, quantity per hour, quantity per day, whatever.

CubeCart (from what I can tell) will send a batch of 20 emails pausing 2000 milliseconds between each batch until done (or until something goes wrong.)

Please consult with your hosting provider to determine if there are email sending limits being enforced.

 

I do not know of a way to restrict the second sending of a newsletter to only those who it was not successfully sent to.

Edited by bsmither
Link to comment
Share on other sites

Thanks. Cubecart is still set to use the php mail function. I can set it to use the SMTP method and send a test email, which works. I presume that if I use this method, I should be able to send all the emails. Also, I think I can force the "status" to 0 in the newsletter table for those that have already got the email and then update them after to status = 1 again.

However, I can't save these SMTP setting because I still have a problem with crap in the offline tab (at least that's what I guess the problem is). I'm reluctant to delete the config entry in the cubecart_config table because it deletes all the useful stuff. Is there a way of sorting this problem - its a real PITA.

 

Link to comment
Share on other sites

I see. You are still not able to save Store Settings.

Please try this: Using the file explorer (a common tool found in the hosted account's control panel of your site), find /includes/global.inc.php. You will need to clear the read-only state of that file. Open that file for editing.

At the bottom of the file:

Find:

?>

Above that, add:

$glob['debug'] = true;
$glob['debug_ip_addresses = "1.2.3.4";

where "1.2.3.4" is the IP address of your local Internet connection (www.showmyip.com).

This forces CubeCart to use it's debug mode. For every page load, CubeCart will add details that can be used to analyze certain aspects of CubeCart's operations.

This debug data will be shown in a browser popup window. Your browser may ask for permission to show this popup. Allow it. (If the popup shows the page content, reload the page. And if using Firefox, you may need to close each popup window as they get displayed before fetching the next page. That's because of an unfortunate feature of Firefox.)

So, having done that, have CubeCart show the Store Settings page. Take a quick read through the debug data shown in the popup. Close that popup.

On the Advanced tab, make a small change - such as in the Log Retention section, changing the number days to keep for the Admin Activity Log from 30 to 60 days.

Save.

There should be a new popup showing debug data. There will be two sections: the first is what happened when receiving and processing the saved data, the second when fetching all data to populate the page to be displayed.

What is hoped to be seen is how much POST data is being received, and what is being updated in the database.

Do not post that debug data in a forum reply as it contains personal info. Instead, send me a PM with the plain text contents of that popup.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...