Send email


Hi again people,

Anyone having problems with Mautic sending emails? I tried both SMTP and sendmail with no success.
Using the official package downloaded here...

All I get is 'ignored' emails in the report 'All Emails'

Thanks in advance

Hi again people,

Anyone having problems with Mautic sending emails? I tried both SMTP and sendmail with no success.
Using the official package downloaded here…

All I get is ‘ignored’ emails in the report ‘All Emails’

Thanks in advance

I just tried Mandrill and it didn’t work through that either. Granted, I’m on my localhost, but seeing as Mandril is SaaS, it should simply work.

I also tried Mandrill through SMTP and that doesn’t work either, although in both of my tests, the email gets logged in the email_stats table.

Additionally, in my app/logs/prod.php I see the following:

[2015-02-04 00:17:01] app.ERROR: Exception occurred while flushing email queue: Connection could not be established with host smtp.mandrillapp.com [ #0] [] []

I would expect if that were the case, there to be some kind of message / error shown in the UI somewhere and an alert/notification indicating there is an issue immediately.

Are you using the “queue” or “send immediate” for the “how should email be handled?” config parameter?

If using the queue, do you have files listed in app/spool/default (or where ever you configured the spool directory to be located)?

@nateritter, when you said you tried SMTP, are you referring to using “other smtp server” and filling in Mandrill’s details? When selecting, Mandrill, all we are doing “under the hood” is using the SMTP protocol. It’s possible we don’t have the config settings right as we don’t have an account and thus just used documentation to get the settings. If you find that configuring the other smtp server with Mandrill’s details work but Mandrill doesn’t, let me know and we’ll get that fixed.

If you choose “PHP mail” does the mail get sent?

Thanks,
Alan

@alanhartless I’m using “send immediate”.

Yes, I’m using “other smtp server” and filling in Mandrill’s details. I’ve also tried just the Mandrill one. Neither works.

I just changed to “PHP mail” (I’m on my localhost - OS X using homebrew’s mysql and PHP custom config), and now I’m getting the following error (and can’t access the settings to change it back without going direct to the database):

Warning: include(): Unable to allocate memory for pool. in /Users/nateritter/Sites/mautic.dev/app/cache/prod/classes.php on line 4502

My php config has 2G allocated to memory though, so something’s not right (sorry for hijacking this thread from email to memory).

Fixed the memory issue by just restarting my server… sorry for the diversion to the thread.

I feel as though I’m not doing something right in actually getting the emails sent out in the first place. What’s the fastest way to test this?

Hey Nate,

Do you have a gmail account or some other smtp server that you can test with? Is this with beta3 or latest source at github (just so I can try and trace the issue).

Thanks,
Alan

I wondered about the github source, so I just switched to that and tried again. I actually can’t get past the 500 error I just posted about here at this point, so I’ll have to keep working on this after I get that one fixed first I guess.

I do have a gmail account I can test with, though, once that other error is fixed.

I replied to that post with a fix. Let me know if gmail works or not. Gmail is working for me; I don’t have a mandrill account to test with. I’ll test the other smtp server here in just a few.

Thanks,
Alan

Gmail finally worked… I had to send it manually (looking like a different bug/issue), but it worked.

Yea, Mandrill definitely isn’t working. If I can jump in and try to debug it and submit a pull request later I will.

Hey Nate,

I added a “test connection” button to the config beside the transport button. Can you grab the latest source, apply it (delete the app/cache/prod folder), then try that test connection to see what error swift mailer is throwing?

Thanks,
Alan

Side note, I tried to switch back to Mandrill, entering username and password for the account and hitting either Apply or Save and Close, and I get the following:

Uncaught SyntaxError: Unexpected token }     edit:1

I checked out the JS that’s calling that, hard refreshed on that page, and killed my browser cache… still throwing that for now.

That said, after running the test button, it now says success. Earlier it said:

Failed to authenticate on SMTP server with username "nate@perfectspace.com" using 2 possible authenticators

Will update this in a moment with the results of a test sending…

Update: It didn’t work. So, I went back and hit the Test button again, and it said:

Failed to authenticate on SMTP server with username "nate@perfectspace.com" using 2 possible authenticators

I didn’t realize Mandrill offered a free version. So I signed up for an account and tested it and it works. You have to make sure you are using an API key rather than your password. Log into Mandrill, click settings, then under SMTP & API Credentials, generate a new api key or copy an existing one.

If you’ve already done that, can you make sure you copied the api key correctly? Also note that the test connection requires that you type in or copy/paste the password as it pulls the values from the current form (the password doesn’t repopulate the input after saving for security reasons).

Thanks!
Alan

Oh, and are you able to view a trace on that JS uncaught JS error? In many of the browser development tools you can click a triangle beside the error to view a trace to where the error originated.

Thanks!
Alan

It’s doing an XHR call.

Here’s the URL it’s POSTing to:

http://mautic.dev/config/edit?mauticUserLastActive=1&mauticLastNotificationId=38

Here’s the response:

<br /> <b>Notice</b>: Undefined index: transifex_password in <b>/Users/nateritter/Sites/mautic.dev/app/bundles/CoreBundle/EventListener/ConfigSubscriber.php</b> on line <b>50</b><br /> {"redirect":"/config/edit"}

Oh, and yes, since I’m familiar with Mandrill, I’ve done all those things you mentioned.

Hey Nate,

This file should fix that error. https://github.com/mautic/mautic/blob/e13bb002fa9107199d68e07516a11ede68aff499/app/bundles/CoreBundle/EventListener/ConfigSubscriber.php

As for mandrill, I’m not really for sure what is going on. Do you think you could try some debugging? The code I added to check a connection is at https://github.com/mautic/mautic/blob/e13bb002fa9107199d68e07516a11ede68aff499/app/bundles/CoreBundle/Controller/AjaxController.php#L548. The class that sets the mandrill details is in MandrillTransport.

Thanks!
Alan

I will try to take a look this weekend or Monday afternoon. Thanks @alanhartless.