Mautic Community Forums

Emails not sending

I just tried to send a new segment email. After clicking send, the emails are just sat doing nothing. They should be sent immediately.



Screen-Shot-2017-02-24-at-11.09.04-AM.png



In the current error log in System Info, I have these error messages:



[2017-02-24 11:00:00] mautic.ERROR: PHP Error: Call to undefined method setApiKey - in file /home/theonls1/public_html/ieltscharlie/go/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php - at line 291 [] []

[2017-02-24 11:00:04] mautic.ERROR: PHP Error: Call to undefined method setApiKey - in file /home/theonls1/public_html/ieltscharlie/go/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php - at line 291 [] []



(Messages which might as well be written in Sanskrit for all the use they are to me!)



I’d actually tried sending these emails around 45 minutes before this.



There’s nothing in the /app/spool folder.

I’ve been able to send segment emails before, although I haven’t done this for a couple of weeks - campaign emails are sending ok.

I can send a test email via Amazon SES.



Help!

I just tried to send a new segment email. After clicking send, the emails are just sat doing nothing. They should be sent immediately.

In the current error log in System Info, I have these error messages:

[2017-02-24 11:00:00] mautic.ERROR: PHP Error: Call to undefined method setApiKey - in file /home/theonls1/public_html/ieltscharlie/go/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php - at line 291 [] []
[2017-02-24 11:00:04] mautic.ERROR: PHP Error: Call to undefined method setApiKey - in file /home/theonls1/public_html/ieltscharlie/go/vendor/swiftmailer/swiftmailer/lib/classes/Swift/Transport/EsmtpTransport.php - at line 291 [] []

(Messages which might as well be written in Sanskrit for all the use they are to me!)

I’d actually tried sending these emails around 45 minutes before this.

There’s nothing in the /app/spool folder.
I’ve been able to send segment emails before, although I haven’t done this for a couple of weeks - campaign emails are sending ok.
I can send a test email via Amazon SES.

Help!

Thanks. I’m on 2.5.1. (Haven’t yet worked out how to update the software)

I made the change. It still didn’t work.

I’m ugrading now to 2.6.1 after backing everything up. Fingers and toes are crossed.

…and the update has been stuck on “downloading package” for 35 minutes :frowning:

(Why am I not surprised)

Ok, on my second attempt it installed…let’s hope things work now !

I’ve now upgraded to 2.6.1. I am still completely unable to send any segment emails. Campaign emails send ok.

I have created a new email, to be sent to a new segment (and just to add to the fun and games, the email builder won’t let me drag text boxes into my email body). When I send this email, the emails are still stuck as pending.

Again, there is nothing in the app/spool folder. There are now no error logs in system config. There is however plenty in the app/logs folder, a 6.26MB file no less. Here’s an example of what is in there:

[2017-02-25 07:45:15] event.DEBUG: Notified event “console.command” to listener “SymfonyComponentHttpKernelEventListenerDebugHandlersListener::configure”. [] []
[2017-02-25 07:45:15] event.DEBUG: Notified event “console.terminate” to listener “MauticCoreBundleEventListenerConsoleTerminateListener::onConsoleTerminate”. [] []
[2017-02-25 07:45:15] event.DEBUG: Notified event “console.terminate” to listener “SymfonyBundleSwiftmailerBundleEventListenerEmailSenderListener::onTerminate”. [] []
[2017-02-25 07:45:16] event.DEBUG: Notified event “console.command” to listener “SymfonyComponentHttpKernelEventListenerDebugHandlersListener::configure”. [] []
[2017-02-25 07:45:16] doctrine.DEBUG: SHOW FULL TABLES WHERE Table_type = ‘BASE TABLE’ [] []
[2017-02-25 07:45:16] doctrine.DEBUG: SELECT version FROM maunf_migrations [] []
[2017-02-25 07:45:16] doctrine.DEBUG: SELECT version FROM maunf_migrations WHERE version IN (‘20150402000000’, ‘20150504000000’, ‘20150521000000’, ‘20150718000000’, ‘20150724000000’, ‘20150801000000’, ‘20150829000000’, ‘20150901000000’, ‘20151022000000’, ‘20151120000000’, ‘20151207000000’, ‘20160114000000’, ‘20160225000000’, ‘20160405000000’, ‘20160414000000’, ‘20160420000000’, ‘20160426000000’, ‘20160429000000’, ‘20160504000000’, ‘20160506000000’, ‘20160520000000’, ‘20160523000000’, ‘20160606000000’, ‘20160615000000’, ‘20160617000318’, ‘20160624032452’, ‘20160630000000’, ‘20160630000001’, ‘20160630000002’, ‘20160712000000’, ‘20160712000001’, ‘20160719000000’, ‘20160720000000’, ‘20160722000000’, ‘20160725161822’, ‘20160726000000’, ‘20160726000001’, ‘20160728000000’, ‘20160731000000’, ‘20160805000123’, ‘20160808000000’, ‘20160916000000’, ‘20160919204648’, ‘20160920195943’, ‘20160926000000’, ‘20160926000001’, ‘20160926182807’, ‘20161004080958’, ‘20161004090629’, ‘20161004123446’, ‘20161024162029’, ‘20161026110456’, ‘20161026202839’, ‘20161031134707’, ‘20161116195435’, ‘20161122172519’, ‘20161122215214’, ‘20161123225456’, ‘20161124145649’, ‘20161125002837’, ‘20161222183556’, ‘20170106102310’, ‘20170108012944’, ‘20170109025947’, ‘20170113015255’, ‘20170113143922’, ‘20170127205928’) ORDER BY version DESC LIMIT 1 [] []
[2017-02-25 07:45:16] doctrine.DEBUG: SELECT version FROM maunf_migrations [] []
[2017-02-25 07:45:16] doctrine.DEBUG: “START TRANSACTION” [] []
[2017-02-25 07:45:16] doctrine.DEBUG: SELECT TABLE_NAME AS Table, NON_UNIQUE AS Non_Unique, INDEX_NAME AS Key_name, SEQ_IN_INDEX AS Seq_in_index, COLUMN_NAME AS Column_Name, COLLATION AS Collation, CARDINALITY AS Cardinality, SUB_PART AS Sub_Part, PACKED AS Packed, NULLABLE AS Null, INDEX_TYPE AS Index_Type, COMMENT AS Comment FROM information_schema.STATISTICS WHERE TABLE_NAME = ‘maunf_dynamic_content_stats’ AND TABLE_SCHEMA = ‘theonls1_maut653’ [] []

Maybe this is connected with the update to 2.6.1. I have no idea if this might be related to my inability to send emails.

In a log file from yesterday (the one I posted at the top of the thread), I’ve also noticed this information:

[2017-02-24 13:18:41] mautic.ERROR: Deprecation: SymfonyComponentDependencyInjectionDefinition::setFactoryService(doctrine) is deprecated since version 2.6 and will be removed in 3.0. Use Definition::setFactory() instead. - in file /home/theonls1/public_html/ieltscharlie/go/vendor/symfony/dependency-injection/Definition.php - at line 204 [] []

In this relevant to my inability to send email?

I am now at a total dead-end. My only option now is to abandon Mautic entirely.

Well, it seems that some emails DID send. I tried sending the same email to a smaller segment, and even though the “Sending is in progress” bar was stuck at 0%, Amazon SES (my email server) was reporting that a number of emails (a number similar to the segment size) had been sent. I tried with another small segment and the same thing happened.

When I checked on the Email Channels screen, these 2 emails showed “0 pending” and “x sent” (where “x” is the segment size). Meanwhile, the “Sending is in progress” bar (open in another window) was still stuck at 0%.

So it seems that this “Sending is in progress” bar is one problem. It is not updating for some reason. Here it is again:

But there is a second problem. I next tried to send the same email to a much larger segment (1084 contacts). This time it is showing “1084 pending” and “0 sent”. I’ve tried sending all of the emails at once, and also in batches of 100. I’m not 100% sure of this, but some of these may have been sent as the email stats is showing 2 clicks for this email (maybe it was from a test send though) and the number of emails on Amazon SES seems to be a bit higher than earlier.

So it seems none (or only some) of the emails from a larger segment are sending.

All I can do now is throw my hands up in exasperation and frustration and hope I might get some response from someone.

Anyone?

Hi, thanks for getting back to me.

No, it’s set to “send immediately”.

No

Should I set this cron job up? Do I need to set a “publish at” date for this?

The documentation says: “the emails must be published and must have a published up date” - does “published up” = “publish at”?

(A previous segment email sent without this cron job.)

Also

php /path/to/mautic/app/console mautic:broadcasts:send [–id=ID] [–channel=CHANNEL]

ID is from the Emails list. What goes as CHANNEL? Is it “EMAILS” ?

When the cron job ran, I got this message:

[SymfonyComponentConsoleExceptionRuntimeException]
Too many arguments, expected arguments “command”.
mautic:broadcasts:send [-c|–channel [CHANNEL]] [-i|–id [ID]] [-f|–force] [-t|–timeout TIMEOUT] [-h|–help] [-q|–quiet] [-v|vv|vvv|–verbose] [-V|–version] [–ansi] [–no-ansi] [-n|–no-interaction] [-s|–shell] [–process-isolation] [-e|–env ENV] [–no-debug] [–]

My cron job is:
/usr/local/php56/bin/php-cli -q /home/theonls1/public_html/ieltscharlie/go/app/console mautic:broadcasts:send [–id=25] [–channel=Emails]

I’m guessing remove the square brackets?

I removed the square brackets. Now I’m getting this message when the cron job runs:

±--------±-------±---------+
| Channel | # sent | # failed |
±--------±-------±---------+

Is this good or bad news?

Ok cheers, Thanks for trying.

OK, yet again I’ve had to solve my own problem through trial and error.

I had to reduce the number of emails to send in a batch. I had tried to send as a single batch, and also as a batch of 100 emails (the default). Today, as one last desperate stab in the dark (inspired by a related problem of another user), I sent the email in batches of 10. It started to send.

I can’t be the only user with this problem. So if you are having the same problem, with the emails stuck on all pending, zero sent., then cancel the send process, and reduce the batch number until it does send.

This might, of course, be a problem with my host (Siteground) or my SMTP server (Amazon SES), rather than Mautic. But it should still be pointed out in the Mautic documentation, so could one of the devs add this solution?

(I have tried myself to add something to Mautic documentation already, related to cron jobs, and got a submitted successfully message, but my edit never appeared.)

I’m having the exact same problem yet I am unable to send no matter how low I set the batches I am running on 2.6.1 has there been any update on this?

Just read this comment, after posting a ‘reduce batch size’ suggestion on your other post. Shame it didn’t work :frowning: I feel your pain and frustration.